// the setup function runs once when you press reset or power the board void setup() { pinMode(14, OUTPUT); // red LED pinMode(15, OUTPUT); // blue LED pinMode(5, OUTPUT); // pin that control the MOSFET that control the motor } // the loop function runs over and over again forever void loop() { digitalWrite(14, HIGH); // on the red LED and make the motor turn digitalWrite(15, LOW); digitalWrite(5, HIGH); delay(5000); digitalWrite(14, LOW); // on the blue LED and stop the motor digitalWrite(15, HIGH); digitalWrite(5, LOW); delay(5000); }