arduino:arduino_crash_course:program_structure
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
arduino:arduino_crash_course:program_structure [2013/07/07 22:32] – mithat | arduino:arduino_crash_course:program_structure [2017/12/06 01:01] (current) – mithat | ||
---|---|---|---|
Line 13: | Line 13: | ||
void loop() { | void loop() { | ||
- | // Stuff in here gets run over and over and over again (until you turn the power off). | + | // Stuff in here gets run over and over and over again |
+ | // (until you turn the power off). | ||
} | } | ||
</ | </ | ||
- | Whatever you write in the body of the '' | + | Whatever you write in the body of the '' |
===== Blink an LED ===== | ===== Blink an LED ===== | ||
Line 29: | Line 30: | ||
void setup() { | void setup() { | ||
- | | + | pinMode(13, OUTPUT); |
- | | + | |
} | } | ||
Line 53: | Line 53: | ||
void setup() { | void setup() { | ||
- | | + | pinMode(ledPin, |
- | | + | |
} | } | ||
Line 77: | Line 76: | ||
// use variable ledPin to store the pin number that drives the LED | // use variable ledPin to store the pin number that drives the LED | ||
int ledPin = 13; | int ledPin = 13; | ||
+ | |||
// define the LED's on and off times in milliseconds | // define the LED's on and off times in milliseconds | ||
int onTime = 1000; | int onTime = 1000; | ||
Line 82: | Line 82: | ||
void setup() { | void setup() { | ||
- | | + | pinMode(ledPin, |
- | | + | |
} | } | ||
arduino/arduino_crash_course/program_structure.1373236354.txt.gz · Last modified: 2013/07/07 22:32 by mithat