Skip to content

nmrr/flipperzero-atomicdiceroller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

flipperzero-atomicdiceroller

🎲☒ An atomic dice roller for the Flipper Zero ☒🎲

banner

Geiger Counter 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 sources

Dice 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] Exit

If 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, API Mismatch error may appear if you are using custom firmware. You can bypass this error but the program may crash.

Changelog

  • 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

About

🎲☒ An atomic dice roller for the Flipper Zero ☒🎲

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages