Hello there,
why do I get only the number 12 as an output when I am using this code? I thought I would get an output between the number 10 and 11. thank you very much!
best regards,
Tom
long int randNumber;
void setup(){
Serial.begin(9600);
// if analog input pin 0 is unconnected, random analog
// noise will cause the call to randomSeed() to generate
// different seed numbers each time the sketch runs.
// randomSeed() will then shuffle the random function.
randomSeed(analogRead(0));
}
void loop() {
// print a random number from 10 to 19
randNumber = random(10, 20);
if (randNumber = (10, 12)){
Serial.println(randNumber);
}
delay(50);
}