Hi everyone, I apologize if my English will not be good, and if something is not understandable just let me know, I'll try to explain better. I should start a little project for a laboratory course, but I never used Arduino before, and I am here to ask about feasibility: the project is to build the model of an "intelligent" traffic light that switches from red to green in the different road lanes depending on the amount of vehicles waiting.
My idea is to simulate the waiting time of vehicles with a switch that would enable an integrator of voltage indicating the amount of time that a vehicle is stopped at the traffic light, more vehicles would activate more integrators. The traffic light should give priority to the lane where the sum of those voltages is higher (with some sensible criterion above it, for example minimum green time required or something like that).
Here it is when Arduino comes: it should take all these voltages, and do some elaboration, like sum voltages representing cars from the same lane, and then compare the resulting voltages of the different lanes, to decide which one is higher and switch green a traffic light and red the others with a voltage output on some leds.
Is Arduino able to do these tasks?
Also the tricky part I suppose will be the one about setting integrators, do you see any difficulty that might come up and I have not seen perhaps?
Thanks for your attention to anyone who will answer