PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #include <Entropy.h>
-
- void setup()
- {
- uint8_t random_byte;
- uint16_t random_int;
-
- Entropy.Initialize();
-
- // Simulate a coin flip
- random_byte = Entropy.random(2); // return a 0 or a 1
-
- // Return a random integer (0 - 65365)
- random_int = Entropy.random(WDT_RETURN_WORD);
- }
-
- void loop()
- {
- }
|