Skip to content

Commit c68b727

Browse files
committed
Add exp0: blinking LED
0 parents  commit c68b727

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed

exp0-blinking-led/blinking-led.ino

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* @file blinking-led.ino
3+
*
4+
* This is free and unencumbered software released into the public domain.
5+
* Anyone is free to copy, modify, publish, use, compile, sell, or
6+
* distribute this software, either in source code form or as a compiled
7+
* binary, for any purpose, commercial or non-commercial, and by any
8+
* means.
9+
*
10+
* In jurisdictions that recognize copyright laws, the author or authors
11+
* of this software dedicate any and all copyright interest in the
12+
* software to the public domain. We make this dedication for the benefit
13+
* of the public at large and to the detriment of our heirs and
14+
* successors. We intend this dedication to be an overt act of
15+
* relinquishment in perpetuity of all present and future rights to this
16+
* software under copyright law.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21+
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
22+
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
23+
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24+
* OTHER DEALINGS IN THE SOFTWARE.
25+
*
26+
* For more information, please refer to <http://unlicense.org/>
27+
*/
28+
29+
/*
30+
* The pin # of the LED we are going to use.
31+
*/
32+
#define LED_PIN 13
33+
34+
/*
35+
* 1-time setup code that runs during initialization.
36+
*/
37+
void setup(void) {
38+
pinMode(LED_PIN, OUTPUT);
39+
}
40+
41+
/*
42+
* Main code, which will run forever.
43+
*/
44+
void loopvoid() {
45+
digitalWrite(LED_PIN, HIGH);
46+
delay(1000);
47+
digitalWrite(LED_PIN, LOW);
48+
delay(1000);
49+
}

exp0-blinking-led/notes.org

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
* Extensions
2+
- Can you change the PIN in the code and figure out how to still get the LED to blink?
3+
- Can you make 2 LEDs blink at the same time from a single pin?
4+
- Can you make 2 LEDs blink at the same time from two different pins?
5+
- Can you make 2 LEDs blink alternatively?

libraries/readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
For information on installing libraries, see: http://www.arduino.cc/en/Guide/Libraries

0 commit comments

Comments
 (0)