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.

19 line
299B

  1. #include <Entropy.h>
  2. void setup()
  3. {
  4. uint8_t random_byte;
  5. uint16_t random_int;
  6. Entropy.Initialize();
  7. // Simulate a coin flip
  8. random_byte = Entropy.random(2); // return a 0 or a 1
  9. // Return a random integer (0 - 65365)
  10. random_int = Entropy.random(WDT_RETURN_WORD);
  11. }
  12. void loop()
  13. {
  14. }