loading

In this tutorial I will share to you on how you can simulate a traffic light system using Linkit One board. This could be a good starting project for people who just learning microcontroller.

Step 1: Hardware

Fof this project we will use a very minimum components, such as:

  • Linkit One Board
  • 3 LED (Red, Yellow, Green)
  • 3 330 Ohm Resistor
  • 4 Jumper Wires
  • A bread board
  • Micro USB Cable

Step 2: Setup Linkit One

Before you could do some coding to your board, you need to do a little bit of setup.

Here are a few recomenndation from instructables to get started with your linkit one:

Setup 1

Setup 2

Step 3: Hardware Setup

Make the connection from Linkit One board to your LED Just Like in the picture. In this tutorial we wiil use 3 digital pin such as:

Pin 8 ----->Green LED

Pin 9 -----> Yellow LED

Pin 10 ----->Red LED

Step 4: The Code and Result

After you make all the connection. Upload the following code to Linkit One board and the Upload it. The you will see each light turn on every 3 second. you can change the duration simply by changing the delay

int redPin = 10;
int yellowPin = 9; int greenPin = 8; void setup() { pinMode(redPin, OUTPUT); pinMode(yellowPin, OUTPUT); pinMode(greenPin, OUTPUT); } void loop() { digitalWrite(redPin, HIGH); digitalWrite(yellowPin, LOW); digitalWrite(greenPin, LOW); delay(3000); digitalWrite(redPin, LOW); digitalWrite(yellowPin, HIGH); digitalWrite(greenPin, LOW); delay(3000); digitalWrite(redPin, LOW); digitalWrite(yellowPin, LOW); digitalWrite(greenPin, HIGH); delay(3000);

}

About This Instructable

124views

4favorites

License:

More by chalei:Linkit One IoT: Sending SMS without SIM Card Linkit One: Blowing an LED Linkit One: Debounce button 
Add instructable to: