🤖
KidsCode
  • Welcome to KidsCode
  • Setting up mBlock
  • Arduino Lessons
    • Arduino Beginner Lessons
      • Blinking an LED
      • LED Switching
      • LED Chasing
      • Traffic Signal
      • Buzzer
      • Buzzer + Push Button
      • LED + Push Button
    • Bluetooth LED
  • Arduino Robot Car
    • Arduino Bluetooth Car
      • What you will need
      • Circuit Diagram
      • Assembly the Car
      • Upload the Code
      • Bluetooth setup and Test
  • Micro:bit Beginners
    • micro:bit, the hardware
    • Overview of MakeCode
    • Video Library
    • Lesson 1
      • My micro:bit
      • Safety first!
      • Plug in your micro:bit
      • My name is?
      • Learning Outcomes
    • Lesson 2
      • Whats your name again?
      • How fast is your heart beat?
    • Lesson 3
      • Please switch on the TV
      • One, Two, Three
      • Keep pressing that buttons
    • Lesson 4
      • Variable, what is that!!
      • Step Counter
      • 1 + 1 = 2
  • Micro:bit Advanced Activities
    • Blinking an LED
    • Traffic Signal
Powered by GitBook
On this page
  • What will we do
  • Parts List
  • Wiring it up
  • mBlock IDE
  • Block Coding

Was this helpful?

  1. Arduino Lessons
  2. Arduino Beginner Lessons

LED Chasing

What will we do

In this lesson we will add one more LED and create a light chasing effect. We will use 3 of the same color LED’s.

The sequence for the code will be as follows

  • Turn LED1 ON

  • Wait for 0.5 second

  • Turn LED1 OFF and LED2 ON

  • Wait for 0.5 second

  • Turn LED2 OFF and LED3 ON

  • Wait for 0.5 second

  • Turn LED2 ON and LED3 OFF

  • Wait for 0.5 second

  • Turn LED2 OFF and LED1 ON

Parts List

You will need the following parts:

  • 1x arduino uno

  • 1x arduino USB Cable

  • 1x Breadboard

  • 3x Jumper Wire

  • 3x LED (all same colour)

  • 3x Resistor

Wiring it up

Ensure that the LED are the right way around, with the longer positive leads (anodes) to the left.

mBlock IDE

Block Coding

PreviousLED SwitchingNextTraffic Signal

Last updated 4 years ago

Was this helpful?

Please ensure that you have mBlock setup on you computer. Click to setup mBlock

You purchased your Arduino kit from the

Launch the mBlock IDE () and select the Arduino Uno Device and install the

here
here
https://ide.mblock.cc/#/
Kids Code Extension
Arduino UNO R3 Basic Starter KitRoboFactory
Logo
mBlock Block-Based IDE- Coding for Beginners
Logo