Stap 3: Het timer-programma uploaden naar de Arduino
Kopieer de volgende code in de Arduino IDE en uploaden naar je Arduino.
// Timer<br>// Turns on an LED on for 1/2 hour, // then off for 71 1/2 hour, repeatedly. // The setup() method runs once, when the sketch starts void setup() { pinMode(13, OUTPUT); // initialize the digital pin as an output } // the loop() method runs over and over again, // as long as the Arduino has power void loop() { digitalWrite(13, HIGH); // set the LED on delay(1800000); // wait for 1/2 hour digitalWrite(13, LOW); // set the LED off delay(257400000); // wait 71 1/2 hours }