Arduino/timer/timer.ino

18 lines
537 B
C++

//code to create a 1 Hz pulse signal
void setup() {
pinMode(13, OUTPUT);
pinMode(10, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(10, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
digitalWrite(10, LOW);
delay(900); // wait for a second
}