Using the Arduino 101 Essentials: Lesson 1 - Blinking LED

by TechMartian in Circuits > Arduino

1959 Views, 17 Favorites, 0 Comments

Using the Arduino 101 Essentials: Lesson 1 - Blinking LED

2016-06-28 08.40.02.jpg

Recently, I received an Arduino 101 kit (Arduino Uno (but with Intel instead of Atmel chip + IMU + Bluetooth + more), and it reminded me of when the Arduino was first released and since it wasn't available in Canada, all I could do was learn and read about how to use it.

It surprises me how many people are still not familiar with "how to Arduino". [I'd imagine that'd be a verb by now given the amount of power and control it gives to makers.] Back in the day (a few years ago when I was in high school), when I want to develop something similar to what an Arduino can accomplish, I'd have to pick up a PIC and program in Assembly Code. Yes. ASSEMBLY. The Arduino library is built upon a similar structure, but it has gotten to the point where even 8 year olds can be tech makers and invent new technology.

I have decided to make this the first module in a series of lessons from the very basic to advance skills like remote control robots. The turning on an LED is the most basic visible output of an Arduino and is the software complement of printf ("Hello World"); So it is only makes sense that we start with Blinking an LED as the first module.

Other projects will compound on the preceding lesson modules.

Tools and Supplies

2016-06-28 08.29.24.jpg
2016-06-28 08.29.43.jpg
2016-06-28 08.42.01.jpg
IMG_0309.jpg

* Arduino 101. Note that, an Arduino 101 is not necessary for this particular project, but as we get to more advanced features and Arduino 101 will be needed.

* Red 5mm LED

* 100Ω Resistor

* Breadboard

* Jumper Cables

LED Black Box

Screen Shot 2017-06-28 at 9.39.11 PM.png

Since this is the first lesson, each of the new components used will be introduced with a brief overview or description of what is inside the metaphorical black box.

A Light-Emitting Diode (LED), as with the nature of all diodes, will only let current flow in one direction, like a one-way street. When current flows through the LED, it lights up!

The LED has legs of different lengths. The long leg is called the anode and it is where current enters the LED which is always connected to the current source. While, the short leg is called the cathode and it is where the current exit. This should always be connected to ground.

Resistor Black Box

Screen Shot 2017-06-28 at 9.39.33 PM.png

A resistor as the name suggests resists current or the flow of electrons of a particular value. It is composed of some resistive element typically composed of carbon.

Circuit

2016-06-28 08.34.18.jpg
Screen Shot 2017-06-28 at 11.18.38 PM.png

  1. Connect the GND of the Arduino to the black ground rail of the breadboard
  2. Connect the 5V of the Arduino to the red power rail of the Arduino
  3. Place the LED on the Arduino
  4. Connect the resistor between the short leg of the LED to the ground rail
  5. Connect Pin 13 of the Arduino to the long leg of the LED

Code the Arduino

Screen Shot 2017-06-28 at 11.43.56 PM.png

Download the Arduino sketch and upload the code to the Arduino to blink the LED. Each line is commented as to what they do.

Downloads