![]() |
Servos for the camera
Is there anything that you can call to figure out what the position of the servo is? What method would I call?
---Thankx |
Re: Servos for the camera
There isn't a function or method to tell you the position of a servo.
This is an overview of how the servo works: The software tells the robot controller to send the servo a position (0-254). Then the servo will try with all it's might to get to and stay at that position. There is never any feedback to the robot controller from the servo. |
Re: Servos for the camera
How do we know the orientation of the camera then?
|
Re: Servos for the camera
Quote:
|
Re: Servos for the camera
I'm assuming you have the servos hooked up directly to the camera and are using the tracking feedback loop in the camera. In the default code in user_camera.c : camera_track_update() the RC gets some data back from the camera. Among this data is the pan & tilt positions (cam.pan_servo & cam.tilt_servo) of the servos. The pan position is used in user_routines.c : Camera_Processing() to make the robot turn left / right, and with a few more lines of code you can make the robot drive forward / backward based on the tilt.
|
| All times are GMT -5. The time now is 02:49. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi