int potentiometerPin = A0; int fsrPin = A1; int resetPin = A3; int potValue = 0; int fsrValue = 0; int r; void setup() { // put your setup code here, to run once: randomSeed(analogRead(A5)); r = random(0, 2); Serial.begin(9600); Serial.println("random: "); Serial.println(random(0, 500)); } void loop() { // put your main code here, to run repeatedly: potValue = analogRead(potentiometerPin) / 20; fsrValue = analogRead(fsrPin) / 20; Serial.println(r); if(r == 0){ Serial.println(potValue); } else if(r == 1){ Serial.println(fsrValue); } Serial.println("Time: 5"); delay(500); Serial.println("Time: 4"); delay(500); Serial.println("Time: 3"); delay(500); Serial.println("Time: 2"); delay(500); Serial.println("Time: 1"); delay(500); Serial.println("no time left"); delay(10); r = random(0, 2); // analogWrite(resetPin, HIGH); } unsigned long newrandom(unsigned long whatmin, unsigned long whatmax){ return whatmin + random() % (whatmax - whatmin); }