Debian Codegraph @

examples/ATtinyBlink/ATtinyBlink.ino

raw
1 /*
2 Blink
3 Turns on an LED on for one second, then off for one second, repeatedly.
4
5 This example code is in the public domain.
6 */
7
8 // Connect a LED to Pin 3. It might be different in different ATtiny micro controllers
9 int led = 3;
10
11 // the setup routine runs once when you press reset:
12 void setup() {
13 // initialize the digital pin as an output.
14 pinMode(led, OUTPUT);
15 }
16
17 // the loop routine runs over and over again forever:
18 void loop() {
19 digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
20 delay(1000); // wait for a second
21 digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
22 delay(1000); // wait for a second
23 }