04-19-2020 02:24 AM
Hi;
I trying to interface the IR sensor and servomotor through Arduino. To do so; I am using SHARP
GP2Y0A21YK0F IR range finder and GWS S03N STD servo. The programming is performed by using Makerhub. I have attached the program along with the message. I can acquire data from the IR sensor. The value obtained is linearly calibrated to determine the distance based on the datasheet of the IR sensor used. An if-else program is designed to decide the pulse width of the servomotor for a particular range of the distance computed. Although the value is going through the if-else loop; there is no rotational motion in the servo motor.
I am unable to pinpoint the error associated.
Hoping for early response and thank you in advance
Best Regards
09-17-2020 03:01 AM
Hello,
Could you please specify where exactly your issue is?