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.

16 lines
277B

  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. }