Page 2 of 16
Page 42
void setup() {
pinMode(2, OUTPUT);
}
void loop() {
digitalWrite(2, HIGH);
delay(1000);
digitalWrite(2, LOW);
delay(1000);
}
Page 44
void setup() {
pinMode(2, OUTPUT);
}
void gpio_toggle(int gpio_num) {
digitalWrite(gpio_num, !digitalRead(gpio_num));
}
void loop() {
gpio_toggle(2);
delay(1000);
gpio_toggle(2);
delay(1000);
}