Christmas is coming!! It’s time to get the ball rolling and start building the play of lights to decorate our Christmas trees and nativity scenes. We’ll see how to build it using the LinkIt ONE board and five LEDs. Let's get it started!
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: PARTS AND TOOLS
Here the list of components, all very cheap and easily available (except for the LinkIt ONE board):
- LinkIt ONE board
- Battery (optional)
- Jumper wires
- 5x LED (any color)
- 5x transistor 2N3904 (or equivalent)
- 5x 1Kohm resistor
- 5x 100ohm resistor
- Computer with preconfigured Arduino IDE
Step 2: THE TRANSISTOR
The LinkIt ONE board has a max output current < 3mA, which is not enough to entirely turn on an LED (it requires about 15 or 20mA). In this way the LED isn’t bright enough and there’s a risk of damaging the board’s pins. In order to solve the problem I used the transistor NPN 2N3904.
In this project we’ll use the transitors as “switches”. They have 3 pins:
- Base: connected to a LinkIt One board’s output. When electric potential difference is HIGH, current can flow from the Collector to the Emitter and the LED turns on. On the contrary, the current doesn’t flow when the electric potential difference is LOW and as a consequence the LED remains off.
- Collector: connected to the LED’s cathode (negatively-charged, short lead)
- Emitter: Connected to the GND
Step 3: BUILDING THE CIRCUIT
As you can see from the pictures, the circuit is really simple. All the LED’s anodes (positively-charged, long lead) are connected to the 3,3V. The transistor’s emitters are connected to the GND and each collector is connected to the respective LED’s cathode by a 100ohm resistor. The base is connected to the respective LinkIt ONE’s digital pin by a 1Kohm resistor.
Above you’ll find a schematic and the simulation on breadboard.
Step 4: CODE AND FINISH
Once you ended the circuit, you need the code. You’ll find it attached. Now follow these steps:
- Open it with your Arduino IDE
- Select the LinkIt One board
- Select the right COM port
- Set the LinkIt One’s switches to UART and SPI
- Upload it
- If you want, disconnect the USB cable, connect the battery and set the switch to BAT
- Finally, enjoy the game of lights created with your LinkIt ONE broad
You can also have fun modifying the code and trying different combination of lights.
Hope you’ll enjoy it and till next time!!!
Thanks to Pamela Pandolfi for the translation