This week assignment was about build and Program a smart circuit using an Arduino UNO which reads a signal from an input component (Sensor, Switch, or variable resistor) to control an action component (Motor, Buzzer, LED...etc) using Code Blocks
I got my inspiration after watching this video.
The idea is to create a car crossing gate using an IR sensor.
When the sensor detects a car passing, it opens the gate using an servo motor.
After I decide the project idea I start to design the circuit on Tinker Cad.
It is consist of:
Input: IR sensor
Output: Servo Motor - LED - resistor
Power Tool: 9V Power supply
Circuit Type: Parallel
Circuit Link on Tinker CAD: https://www.tinkercad.com/things/5Dy951lcnzA-cool-elzing
5. I test its working...
Title of Media
After I finished the code and uploaded it, the LED was always on.
Solution: When I reviewed the code, I found that I had set it to always be on, so I changed HIGH to LOW. and it was working good.
Title of Media