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.

random_minmax_example.ino 277B

3 years ago
12345678910111213141516
  1. #include <Entropy.h>
  2. void setup()
  3. {
  4. uint8_t random_byte;
  5. Entropy.Initialize();
  6. // Simulate rolling a six sided die; i.e. produce the numbers 1 through 6 with
  7. // equal probability
  8. random_byte = Entropy.random(1,7); // returns a value from 1 to 6
  9. }
  10. void loop()
  11. {
  12. }