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

# 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 <a href="#parts-list" id="parts-list"></a>

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** <a href="#wiring-it-up" id="wiring-it-up"></a>

![](https://gblobscdn.gitbook.com/assets%2F-LskXJjPT2bXMIodrtZq%2F-M8uFvpZUQF6EAMa4V3F%2F-M8uHeu1tiNQC2aPMR7m%2Fled%20chasing.png?alt=media\&token=a35967f3-cd03-42e7-b9a2-e17f377c8af4)

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

## mBlock IDE <a href="#mblock-ide" id="mblock-ide"></a>

Launch the mBlock IDE (<https://ide.mblock.cc/#/>) and select the Arduino Uno Device and install the [Kids Code Extension](/blocking-coding-lessons/beginner-lessons/blinking-an-led.md#install-the-kidscode-extension)

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

![](https://gblobscdn.gitbook.com/assets%2F-LskXJjPT2bXMIodrtZq%2F-M8uIg8-I0DOXGuIqp1S%2F-M8uIrp0mx1HIy1Qd1Dv%2Fled%20chasing%20-%20code.png?alt=media\&token=3c64d355-5f92-4109-a91c-44d5e5439303)

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://learn.arduinosa.co.za/blocking-coding-lessons/beginner-lessons/led-chasing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
