# Controlling LEDs with an Arduino

### What will you need ?

* An Arduino Uno board&#x20;
* 3 X LEDs (of different colors)
* male-to-male jumper wires.
* 3 X 100 ohm (black-brown-black) resistor.
* Breadboard&#x20;
* A computer with the Arduino IDE software.

Connect the anode (long leg) of each LED to digital pins eight, nine, and ten (via the 100 resistors). Connect the cathodes (short leg) to Arduino ground. According to the diagram below:

![3 LEDs connected to an arduino](https://lh6.googleusercontent.com/3WI3ICi_DaPX_mcB-Gq9FPHYP2dDgMQuzCmH5Rcj6qKFV2iXTxzN3XvrE6y0sto8JG2-EUEJYtaaOud4nCghXDS_A_0kwhR3VWCDm9x4tY-vTPC5A9mTEmL4FF1EqPh4dK20peuW)

On your computer, open the Arduino IDE program. Connect the USB cable to the computer and the Arduino board.&#x20;

On the IDE, select the relevant board and the COM port according to the following diagram:&#x20;

![Selecting the board type (arduino.cc)](/files/-Ly91Vbfz_XktUpgaF24)

![Selecting the COM port](/files/-Ly91o7S_Z-d9GYlvoS2)


---

# Agent Instructions: 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:

```
GET https://reacoda.gitbook.io/molemi-iot/controlling-leds-with-an-arduino.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
