![]() |
RUI3 (RAK Unified Interface 3) - RAK4631
|
Functions | |
long | random (long min, long max) |
void | randomSeed (unsigned long seed) |
long random | ( | long | min, |
long | max | ||
) |
min(optional) | lower bound of the random value, inclusive(default = 0) |
max | upper bound of the random value, exclusive |
void setup() { Serial.begin(115200);//UART0 baudrate 115200 randomSeed(analogRead(0)); } void loop() { Serial.print("Random number(0 ~ 999) : "); uint32_t l = random(1000); Serial.println(l); //delay 1 second delay(1000); }
void randomSeed | ( | unsigned long | seed | ) |
seed | number to initialize the pseudo-random sequence |
void setup() { Serial.begin(115200);//UART0 baudrate 115200 randomSeed(analogRead(0)); } void loop() { Serial.print("Random number(0 ~ 999) : "); uint32_t l = random(1000); Serial.println(l); //delay 1 second delay(1000); }