#include AF_Stepper motor(48, 1); void setup() { Serial.begin(9600); Serial.println("Serial Started"); motor.setSpeed(150); } void loop() { analogRead(0); Serial.println(analogRead(0)); if (analogRead(0) < 550 && analogRead(0) > 450) { Serial.println("Torch In Range"); } if (analogRead(0) > 550) {motor.step(1, FORWARD, DOUBLE); } if (analogRead(0) < 450 && analogRead(0) > 75) {motor.step(1, BACKWARD, DOUBLE); } }