Traffic Light Simulation using Arduino
This section will help you set up your workspace and get ready to use Arduino.
- An Arduino board (like the Arduino Uno)
- A USB cable (usually included with the Arduino board)
- Your computer
- Basic electronic components (optional, but helpful for practicing)
- Download the Arduino IDE: Go to the Arduino website and download the latest version of the Arduino IDE for your operating system (Windows, Mac, or Linux).
- Install the Arduino IDE: Follow the installation instructions on the Arduino website to install the software on your computer.
Note: The Arduino IDE is the program you’ll use to write, edit, and upload code to your Arduino board.
- Go to our project repository on GitHub and download the code as a ZIP file:
- Click on the green "Code" button.
- Select "Download ZIP".
- Extract the ZIP file to a folder on your computer where you can easily find it.
Now that you have everything ready, you’re going to open and upload the code to your Arduino.
- Connect your Arduino board to your computer using the USB cable.
- Open the Arduino IDE software.
- In the Arduino IDE, go to File > Open and navigate to the folder where you saved the project files. Open the main
.ino
file. - Select your Arduino board model:
- In the Arduino IDE, go to Tools > Board and select your board (for example, "Arduino Uno").
- Select the correct port for your board:
- Go to Tools > Port and choose the port with your Arduino board. (On Windows, it may show up as COM3 or similar; on Mac, it might look like
/dev/tty.usbmodem...
.)
- Go to Tools > Port and choose the port with your Arduino board. (On Windows, it may show up as COM3 or similar; on Mac, it might look like
- Upload the Code:
- Click the "Upload" button (the right arrow in the toolbar).
- Wait for the "Done uploading" message at the bottom of the screen. Your code is now running on your Arduino!
This project is open-source and available under the MIT License.