Dear all,
In my project, i have an IR sensor mounted on a pan servo.
The goal is to move the pan servo from 0 to 180° (it's done).
How could i realize the next points ? :
For each degre, i want to grab the distance from the IR sensor within an array.
Doing the same for the pan servo ( dimension array = 2).
I mean one array for the distance (180 values) and the same for the servo (180 values).
Once i have the distance:f(degre), i would like to extract the longest distance, associated to the degre of the pan servo.
And at least moving the rc car based on the angle of the pan servo.
How can i achieve this ?
Anyone can help me ?
Thanks for your help and support.
Chris