https://github.com/nmrr/flipperzero-atomicdiceroller
🎲☢ An atomic dice roller for the Flipper Zero ☢🎲
https://github.com/nmrr/flipperzero-atomicdiceroller
flipper-zero flipperzero geiger-counter radioactivity random random-numbers
Last synced: 7 months ago
JSON representation
🎲☢ An atomic dice roller for the Flipper Zero ☢🎲
- Host: GitHub
- URL: https://github.com/nmrr/flipperzero-atomicdiceroller
- Owner: nmrr
- Created: 2023-08-05T10:07:20.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-24T20:28:37.000Z (12 months ago)
- Last Synced: 2024-06-24T22:15:05.077Z (12 months ago)
- Topics: flipper-zero, flipperzero, geiger-counter, radioactivity, random, random-numbers
- Language: C
- Homepage:
- Size: 289 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# flipperzero-atomicdiceroller
🎲☢ An atomic dice roller for the Flipper Zero ☢🎲
[**Geiger Counter**](https://github.com/nmrr/flipperzero-geigercounter) application must work on your **Flipper Zero** to be able to use this application. You need the same **geiger board** and this board must be connected in the same way as described in the description of the **Geiger Counter** application.
**Note:** There is no test port compared to the **Geiger Counter** application, your absolutely need a **geiger board** to run this application.
This application generates **true** random numbers by hashing timestamps obtained when a tick is produced by the **geiger counter** (i.e. when a **beta** or **gamma** ray is detected). Timestamps have 32 bit resolution and are produced from a 64 MHz signal.
Two hash methods have been implemented:
- **CRC32**: 8 ticks are needed to obtain a hash, for low activity sources
- **MD5**: 32 ticks are needed to obtain a hash, for high activity sourcesDice rolls are produced by transforming a single hash into a number between **1 and 6**. Out of scope values are ignored so the dice is really balanced.
Modulo-based methods are ugly because they are usually unbalanced.It's possible to roll the dice without using a **radioactive isotope**. Air contains **radon** gas that is **radioactive**. **Geiger board** can detect descendants of radon gas that emit strong **beta** or **gamma** rays.
## Gallery
![]()
In the left corner, **counts per second** (cps) indicates the activity. In the right corner, **availiable dice rolls** are indicated. 64 rolls can be stored.
## Build the program
Assuming the toolchain is already installed, copy **flipper_atomicdiceroller** directory to **applications_user**
Plug your **Flipper Zero** and build the atomic dice roller:
```
./fbt launch_app APPSRC=applications_user/flipper_atomicdiceroller
```The program will automatically be launched after compilation
**Button assignments**:
button | function
------------- | -------------
**Ok** *[short short]* | Roll the dice
**Left** *[long press]* | Set CRC32 as hash method
**Right** *[long press]* | Set MD5 as hash method
**Up** *[long press]* | Set 0-1 as output range (coin flipper)
**Down** *[long press]* | Set 1-6 as output range (dice roller)
**Back** *[long press]* | ExitIf you don't want to build this application, just simply copy **flipper_atomicdiceroller.fap** on your **Flipper Zero**
Build has been made with official toolchain (0.102.3), **API Mismatch** error may appear if you are using custom firmware. You can bypass this error but the program may crash.
## Changelog
* 2024-06-24
* Bug fix* 2024-03-11
* Bug fix* 2024-02-22
* Bug fix* 2023-12-13
* Output range can be selected, other range will be added later
* MD5 library is now a local library because this library has been removed in the toolchain* 2023-08-05
* Initial release