When i saw the first Video about how to make the led blink it reminded me of the Traffic Light, so i decided to make 3 diffirent Led Lights ( Red, Yellow, Green)
And i'm using An "IR Sensor"
How it works
Like the typical Traffic light, But my Traffic light work diffirently, The Green light is always on so the cars can pass, and when there are punch of people near the IR Sensor
The Yellow light turn on so the people can be ready then the red light turn on and keeps turning on for a couple of seconds so the people can pass freely
Arduino Uno
Tinkercad
Electronics Tools :
breadboard
Jumper wires (Male_Male/Female)
arduino uno
Cable For Arduino UNO
I'm Using the IR Sensor (input); to detect if there's any object near -my hand-, and using the Led (output); to make the Traffic light ( Red_Yellow_Green)
The Electrical circuit simulation on TinkerCad
Using the "Read digital pin" icon, entering the pins for the "out", after that, I used the if else condition, to set the pin of the Leds to HIGH and LOW.
I took this code from TinkerCad by using the blocks+text icon.
The Wiring Details
The IR is connected to pin 6 from "Out"
All the ressistors are connected to "Ground"
The Red And Yellow led turn on by standing my hand near to the "IR SENSOR"
Me and my teammate ( Basmala) helped each other to make our waving hand (عمنا) ✋
we split the tasks to finish it on time
And Our instructor (Ahmed khaled) helped us to run the codes properly
when i got stuck:
I'm planing to use " servo motor" or "stepper motor" in my final project
And i this week, I've learnt how to use "Servo Motor" and control it manually by the "potentiometer" and by "Ultra sonic"
and learnt how to do the coding in "tinker Cad" And "Arduino Uno"
so i hope it'll help me ( إن شاء الله ).
How to use the " Ultra sonic" to wave at it and it waves back to us
and it was very cool and i'll never forget it ✨