01_LED_blink01 by yasusanto

This sketch is missing a short description
**Tutorial 01: Digital Outputs** *Blinking LEDs* **ledPin1** is a constant. Constant is a name used to refer to a fixed number. It is used here to define an Arduino port but it can be changed to any desired name and it can represent any number as long as the name is consistent in your program. A constant is used here so that you can easily choose an alternative port to connect a LED. **setup()** routine runs only once at the beginning of the program to initialise settings, modes, variables, etc. (see setup) **Serial.begin(9600)** opens a serial connection between Arduino Hardware and your computer so that Arduino Hardware can send (and receive) messages to Arduino Software's serial monitor window via USB. This allow you to check what is going on with your Arduino with the Serial Monitor tool in Arduino program. **pinMode** sets the digital pin to either input (receive signal) or output (send signal). ledPin1 (port 4) is set to output here because it needs to output signals to the LED. **loop()** routine is the main body of the program. This continues to run until Arduino is reset or switched off. (see loop) **digitalWrite** sends 1(High = 5V) or 0 (Low = 0V) to the port. Sending "1" turns LED on with the way the LED is connected. **delay** pauses the program for the given amount of milliseconds. (1000 milliseconds = 1 second) The program will then send 0 (Low - 0V) to ledPin1 to turn off the LED. It then pauses for 1000 milliseconds. **Serial.println** then sends a message ("done") to the program's serial monitor with a carriage return. The program will then go back to the beginning of "loop()" routine and repeat the same until Arduino is turned off. ![enter image description here](http://coadaptable.com/dnb603/DNH603_LEDs+Switches.png "enter image title here")

Embed This Sketch

Use the following HTML code to embed the sketch code above in your blog or website.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/sketch:106848" frameborder="0"></iframe>

Embed The Serial Monitor

You can also embed the Serial Monitor section! Just use this HTML code.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/serialmonitor" frameborder="0"></iframe>