I use an arduino uno with a magnetic sensor because i want to create a parking spaces availability.! I have already finish the code to detect the change of the sensor values when a car park over the sensor.. And now i want to write a code to find the time of this change.. What is the easiest method.?? I am thinking to send the data into an array and compare the values so i can find the change between the values.. I am not sure how can i do it.. If anyone can help me with his advice or with example of code please reply..!! Thank you.!
In this picture are the values that i take from the sensor.. the grad value change when i have magnetic field over the sensor.. As you can see grad=149.08, grad= 147.65, grad= 148.53, grad= 149.08 and after that i place magnetic field go to grad= -15.11, grad= -130.60, grad= -129.89, grad= -130.60, grad= -129.89. This is the change that i want to detect and for example after that i will turn on the led.!