![]() |
gyro/camera question
My team was using Easy C during the regionals with a dumper style robot and it worked great. During the off season we have modified the robot to be a shooter, and are trying to make it shoot during autonomous. We are using Easy C, and it is working fairly nicely, but I have a few questions.
There a drive function set up, which was taken from the camera code that came with Easy C. We have installed the gyro sensor, and it is working fine, but the question is how do you get the robot to turn a set amount of degrees (ex:90 degrees)? I have tried this but have not succeeded, and am curious to find out how this is done.The value the gyro is giving out is being called "heading". The second question has to do with the camera. As of now the camera is tracking without the servos, but I would like to know how can we start the servos while tracking? In the servo option under the camera, when the value is either 0 or 1 for the pan and tilt servos, I am assuming this means that the servos are either on or off. When I tried putting both to 1, the servos were not being used. Any help will be greatly appreciated. |
Re: gyro/camera question
1.
For the gyro your best bet is to print the value it returns to the screen and then turn your robot. Use the value it returned to specify a heading. Gyro_Target = 90 Spin = GyroHeading - Gyro_Target You could dump spin into the drive functions used in the tutorial that came with easyC 2. The servos should track when set to 1. You probably have to drag in the "start Camera" block after you set the servos. If its not working you can command the servos to move to a position if they don't move something is wrong with your setup. |
Re: gyro/camera question
The turning with the gyro is working great, and the servos were not working because they were set after the "start camera" block.
Thank you very much. :D |
| All times are GMT -5. The time now is 03:16. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi