I need my arduino code to print out random words that are substituted as a variable. So like i would have a random number generator the spits out random numbers that are tided to a word that then as a variable needs to be printed out. Here is my code now, sorry I am still a beginner to arduino.
long randnumber = 0;
int aye = 1;
int sup = 2;
int boi = 3;
int bruv = 4;
void setup() {
Serial.begin(9600); // Starts the serial communication
}
void loop() {
int randnumber = 0;
randnumber = random(0,4);
Serial.println(randnumber);
}
Thanks in advanced :)))
Aucun commentaire:
Enregistrer un commentaire