Introduction to LED

(0 review)
Check out

Introduction to Arduino

In this project we’re going to introduce you to some hardware components that are essential for turning led (light emitting diode) ON and OFF and its connections. And also learn how to control them by turning the led ON and OFF (blink) by using card bricks.



KIT: Junkbot Edu kit.

Hardwire required:

  • Arduino Uno
  • Breadboard
  • LED
  • USB cable
  • Connecting wires


Code brick program:


The program can be depicted on the hardwire as illustrated below.

Fritzing image:





  1. Connecting LED to Arduino Uno:
    1. Use the USB cable for connecting the Arduino Uno with laptop.
    2. The LED consists of positive (red wire) and negative (black wire) ends.
    3. Connect the positive (red wire) to 5V and negative (black wire) to GND pf the Arduino Uno.
    4. This configuration help you’re led to ON.


Here in this case we can just test whether the led is working or not in order to control and blink the led there is a different approach which is explained below.


  1. Controlling an LED:
    1. To control an LED, take a functional LED you can that by testing it:
    2. Connect the red wire to pin 13 on Arduino and black wire to GND on Arduino.
    3. Connect the Arduino to your laptop using the USB cable.
    4. Open card bricks, click the events block.
    5. Drag 4
    6. Click the control block and connect to it. 5
    7. Click the robot and insert in it 7. Change 9 to 6
    8. Save the code as LED1. 8
    9. This program will turn on the led which is connected to pin 13 when you click the 9 in codebricks.
    10. Connect the USB cable to arduino and laptop.
    11. Go to BOARDS and select arduino uno 10
    12. Go to CONNECT and select the usb port 11and wait until it says serial port connected.
    13. The dot will turn from red to green, representing the connection established. 12
    14. Once port is connected upgrade the firmware 13and wait until it uploads .
    15. Now press 9you can see you’re led glowing (ON state).


  1. Blink: In the previous case, once you click the green flag the led will go on and it will stay like till you give power supply. To make it blink, you need to add more blocks of code.
    1. Open the previous code.14
    2. Go to control and add 15 to the code.
    3. Make a right click or cmd+click on 6 and duplicate the code.
    4. Add it to the code.17
    5. Now modify code as illustrated.18
    6. By clicking the 9, the led will turn on for one second and turn off for one second. In other words, the led will blink.
    7. Establishing connection:
      • Even though you connected Arduino to your computer, it won’t start communicating with codebricks until you connect them manually. Repeat from Step 10 to establish connection





Course Features

  • Lectures 0
  • Quizzes 0
  • Duration 50 hours
  • Skill level All level
  • Language English
  • Students 3
  • Certificate No
  • Assessments Self
  • Codebricks Program


Average Rating

0 rating

Detailed Rating

5 stars
4 stars
3 stars
2 stars
1 stars