Quote Originally Posted by AvionicsMaster1 View Post
After I thought about this for a while you really only need to control 6 LED outputs as North and South would be the same while East and West would be the same.

I would suggest you use the low volume as the default configuration as it's easier to add time than to subtract time. You'd have to sit down and figure out how long you wanted the low volume to be on and how much you'd have added during medium and high volume.

YOU would have to figure out how to sense volume using a timer of some sorts triggered by car movements. Don't forget PBP only does integers. Set a flag when it's medium volume and a different one when it's high. Use a CASE SELECT to choose which SUB to run.

If you want to impress your professor I'd include a routine to check that NS and EW aren't the same. If they are then you should do the total flashing reds.

Use a flow chart and it shouldn't be too difficult. Best wishes
How NS & EW aren't the same ?

and Is this relation right
x= default time in ms
n= number of car / 1 min
f= factor

T= x + n * f
then in the program I write
Pause T

I do not have gd background in PicBasic Pro But I have to do this project
I hope ur help

and thanks you for your suggestion