Learn to build and program a lamp that turns on at the push of a button, using the components of the Maker Control Kit.
For this project, you will use the button and the white LED. Press the button to turn on the lamp, and let it go to turn it off. Get your first invention going!
LEVEL OF DIFFICULTY: Beginner.
DURATION OF THE EXERCISE: 30 min.
- 1 Button
- 1 White LED
- 1 4in1 Build&Code control board
- 1 USB – Micro USB cable
- 1 Clear or white plastic cup
- Material to make the lamp structure
What is an LED?
An LED is a semiconductor electrical component (diode). When a small current passes through it, the diode emits light.
- Connect the white LED to digital port 9 on the 4in1 Build&Code control board.
- Connect the button to digital port 4 on the 4in1 Build&Code control board.
Look at the colors of the cables and the colors of the terminals on the 4in1 Build&Code control board to guide you. Each cable should be connected to its color.
BUILDING THE STRUCTURE:
To build the lamp structure, you will use 150 mm x 18 mm wooden sticks, a clear or white plastic cup, and hot silicone to make all the structure’s joints. Download the quick setup guide and follow the steps shown.
The program makes the white LED turn on when you push the button, and when the button is not pushed, the white LED stays off.
You can do this activity by using Arduino and Bitbloq software, as well as other compatible block programming software. Below you will find the programming code needed for each software.
- Download the Arduino software and go through the installation process.
Code for compatible block programming software
- Download the software and go through the installation process.
- Open the program, and once in, copy the following code:
- Configure and load the code, following the instructions given in the First Steps for the 4in1 Build&Code board document.
- Get the BitBloq software.
- Open the BitBloq program, and once in, copy the following code:
- 3. Configure and load the code, following the instructions indicated in the First Steps for the 4in1 Build&Code board document.
RESULT OF THE EXERCISE:
You have built a lamp that turns on at the push of a button. When you let go, the lamplight will turn off.
Congratulations, you have created your first project!