https://github.com/gbonacini/nuclear_rng_generation2 Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} gbonacini / nuclear_rng_generation2 Public * Notifications * Fork 0 * Star 4 Random Number Generator using common Geiger counter 4 stars 0 forks Activity Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights gbonacini/nuclear_rng_generation2 This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 1 tag Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/g] Use Git or checkout with SVN using the web URL. [gh repo clone gbonac] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @gbonacini gbonacini Add versioning ... 5c0a733 Nov 13, 2023 Add versioning 5c0a733 Git stats * 6 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time build First Public Version November 13, 2023 10:21 screenshots First Public Version November 13, 2023 10:21 test First Public Version November 13, 2023 10:21 .gitignore First Public Version November 13, 2023 10:21 AUTHORS First Public Version November 13, 2023 10:21 CMakeLists.txt First Public Version November 13, 2023 10:21 ChangeLog First Public Version November 13, 2023 10:21 README.md Corrected typos November 13, 2023 10:47 copyright First Public Version November 13, 2023 10:21 geiger_gen2.cpp First Public Version November 13, 2023 10:21 geiger_gen2.hpp First Public Version November 13, 2023 10:21 lwipopts.h First Public Version November 13, 2023 10:21 pico_sdk_import.cmake First Public Version November 13, 2023 10:21 version Add versioning November 13, 2023 10:57 wifi_credential.hpp First Public Version November 13, 2023 10:21 View code Introduction: Hardware: Algorithm and Features: Protocol: Dependencies: Configuration: Installation and Use: README.md Introduction: This project permits the creation of RNG generators based on nuclear decay, interfacing a Geiger counter with audio exit to a MC. It's an evolution of my previous project you find here: NuclearRNG text Here Theoretically it permits the conversion of any Geiger with audio feedback to an RNG in fact, differently from its predecessor, this appliance doesn't use esotic hardware but standard Geiger counters. A Raspberry Pico W is employed as microcontroller platform. alt text Hardware: * A Raspberry Pico (RP2040) is employed as microcontroller platform; * An OpAmp based circuit raises the audio signal level of the Geiger "pulses" captured using the audio jack: alt text Algorithm and Features: * Two thread are in execution : one for Geiger pulses sampling, another to provide RNGs via socket; * In the main loop, a register is cyclically increased from 0 to 15, when it reaches 15 is reset to 0. When a particle is detected, the current value is stored in queue ready to be deployed on request; * Default queue length is 10240 bytes. Protocol: * When a socket connects to the appliance via WIFI, a message with the following format is given as response: ready\n where '\n' is "newline" character * You require a RN sending the message: req * Then you'll receice a RN in an answer with the following format: where: * the first field is a random number in the range 0-15 or the number 16 if an error was generated or no number is available yet; * the chosen range is 0-15 is convenient because the union of two generated random numbers represent a full random byte; * the separator is the character ':'; * then a field with an integer telling you how many RNs are available in the appliance buffer, ready to be requested; * a newline ( '\n' ) ends the message. * Example: 1:1393\n * You can terminate the connection with the command: end * At the moment, concurrent access is not supported (aka I don't need it for now), so, closing the connection also permits different client to connect; Dependencies: * Raspberry Pi Pico SDK * Cmake Detailed instruction for dependencies installation are available on Raspberry website. Configuration: * Before compiling, is required to edit wifi_credential.hpp inserting Wifi SSID and password. Installation and Use: * compile the program as follow: cd build make -f makefile.srv all * deploy the generated binary file named: geiger_gen2.uf2 putting the Pico in "deploy mode" pushing the white button before connecting USB cable and relesing the same button a second after the connection. * A trivial Python client example is present in "test" directory in the present software disgtribution. * The number can be requested from any program able to create Berkeley sockets using the described protocol. About Random Number Generator using common Geiger counter Topics cpp17 rng raspberry-pi-pico Resources Readme Activity Stars 4 stars Watchers 1 watching Forks 0 forks Report repository Releases 1 Beta 0.1.2 Latest Nov 13, 2023 Packages 0 No packages published Languages * C++ 67.2% * C 15.4% * CMake 14.9% * Python 2.5% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time.