Hey Guys,
I need to submit my project tomorrow. I can't figure out what's wrong with it though. I want to do a Density Based 4-way traffic light system using ultrasoonc sensor and arduino mega. What I want is -
- when the distance is equal on all sensors, I want it to follow a regular pattern and timing
- when one sensor has a lower distance, I want the led of that sensor to change to green and rest of the sensors to red
I am pretty sure I have connected everything right.
I wanted to confirm the code using a 2 way system first, but I can't figure it out.
Final.ino (2.57 KB)