Nemdez
Brazil
Asked
— Edited
Como controlar um servomotor através do sensor de colisão de infravermelho da Sharp? e como Robô fazer curvas usando o sensor Ultrassônico?
Related Hardware EZ-B v4
Related Control
Sharp IR Collision
Please see the "Sharp IR Radar" skill control: https://synthiam.com/Products/Controls/Infrared-Distance/Sharp-IR-Radar-16103
Please see the "Ultrasonic Distance" skill control: https://synthiam.com/Products/Controls/Ultrasonic-Distance/Ultrasonic-Distance-16090
In order to make the a robot avoid obstacles you'll need to write an EZ-Script that checks the value from the sensor while it is moving. A low value from the sensor represents an obstacle in front of the robot. Then you can write a script to turn the robot left or right. It works better if you place a servo under the sensor in order to "sweep" the sensor as the robot is moving, then you could tell if the obstacle if on the left or right or in front of the robot and turn the robot accordingly.