Basically, i have a project regarding road conditions which is (forward,backward,right,left based on accelerometer sensor that detects X-Y axis). My input is 2axis-accelerometer and the output is LED. I need a sketch regarding the road conditions. Example, when a vehicle move forward which is Y axis LED must be turn ON. Example no.2, when a vehicle move backward which is -Y axis LED must be turn ON. Example no. 3, when a vehicle move right which is X axis LED must be turn ON, also in -X axis.
when detect Y axis LED turn ON:
-y axis must off:
x axis must off:
-x axis must off:
Thanks for your reply. Hoping for your reply again