Disclaimer: French and not an Arduino expert.
My Range Sensor:
Hello. I'm currently working on a light system for my forklift at work. Basically I want the light to be white when I'm moving and Red when I'm stopped.
Right now I already have my prototype version of the circuit. I already know some basics of the Arduino on how to control my LEDs
I'd like to know how I can use the range sensor as a motion detector. What I mean is when the sensor is not moving and aiming at the ground, since the ground is also not moving, the value is always the same. (Example from the serial print: 5cm, 5cm, 5cm, 5cm ..)
So whenever I move the sensor this value change wich is good. It means that if my forklift is moving the value is changing and If I'm not moving the value won't move.
(Serial print: 5cm , 5cm, 6cm , 7cm, 4cm //moving)
So now I'm wondering how can I use that to trigger an action when my forklift is moving or not.
I tried storing the value of the sensor in the EEPROM memory but didn't worked for me that way.
Thanks in advance if you can help me