![]() |
Re: Camera for turning
Please help me, I can't figure out how to use the camera to actually MOVE the robot. I have the camera code working along with the camera itself, but how do I move pwm01 (left drive wheel) and pwm02 (right drive wheel) individually according to the pan of the camera? I have no idea where to begin with this code. (I just got the code to work for the camera and I've been trying for weeks. Now I only have 2 days, Please help if you can)
Code:
Code:
unsigned int Find_Distance(void)Code:
const rom unsigned int targetRange[] = |
Re: Camera for turning
it may be a little off, but to fix the motors going the wrong way, you can either switch up some wires (not sure which though, im only programming) or put
pwmXX=255-pwmXX; putting the number of the reversed motors in the "XX" at the end of the code. Then you can put all of your code as 255 forward and 0 back. Instead of the odd backwards motor. |
Re: Camera for turning
Ok, I got that. But about making the bot go in the direction of the light, would this work?
Code:
if((Get_Tracking_State() == CAMERA_ON_TARGET) || (Get_Tracking_State() == TARGET_IN_VIEW)) |
Re: Camera for turning
Quote:
Code:
elseGood luck, Robinson Levin |
| All times are GMT -5. The time now is 23:53. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi