> For the complete documentation index, see [llms.txt](https://docs.kidscode.co.za/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kidscode.co.za/arduino-lessons/arduino-beginner-lessons/led-switching.md).

# LED Switching

## What will we do

In this lesson we will learn how to switch two LED’s on and off one at a time. It will work in the following sequence

* Turn Red LED ON
* Wait for 1 second
* Turn Red LED OFF and Yellow LED ON
* Wait for 1 second

Run the above code for 8 times.

{% hint style="success" %}
Please ensure that you have mBlock setup on you computer. Click [here](/setting-up-mblock.md) to setup mBlock
{% endhint %}

You purchased your Arduino kit from [here](https://www.robofactory.co.za/arduino-kits/66-arduino-uno-r3-basic-starter-kit.html)

{% embed url="<https://www.robofactory.co.za/arduino-kits/66-arduino-uno-r3-basic-starter-kit.html>" %}

## Parts List

You will need the following parts:

* **1x** arduino uno
* **1x** arduino USB Cable
* **1x** Breadboard
* **3x** Jumper Wire
* **2x** LED (RED and Yellow)
* **2x** Resistor

## **Wiring it up**

![](/files/-M8uF5W0gT0EuzpVY4Vr)

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

## mBlock IDE

Launch the mBlock IDE (<https://ide.mblock.cc/#/>) and select the Arduino Uno Device and install the [Kids Code Extension](https://docs.kidscode.co.za/arduino-kids-lessons/blinking-an-led#install-the-kidscode-extension)&#x20;

## Block Coding <a href="#block-coding" id="block-coding"></a>

![](/files/-M8uFI0ZKPAaRf3RsQoG)

{% embed url="<https://ide.mblock.cc/#/?cloudProjectId=262531>" %}
