|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#11
|
|||
|
|||
|
Re: Camera isn't working
If I had pasted the exact code I used, it would have confused you more
![]() See, you don't need that giant if block. As the code tells the servo to move closer and closer to the center of the target, the value of PAN_SERVO decreases more and more, until it reaches 127. So if you left it alone, it would slow down as it reached the center for you. Depending on your turret design, the code that I gave would have turned back and forth over and over trying to line itself up correctly. It may have worked how it was, it depends on your robot design. The tilt code is going to be very, very similar to the pan code. You may need to add some limit switches, mechanical stops, or both to prevent the turret from spinning too far. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Who has the camera working? | cvbritton | Programming | 43 | 28-01-2007 13:46 |
| Camera shows no love to drive motors | anifinder | Programming | 4 | 13-02-2006 10:31 |
| Camera code not working.... | DemonYawgmoth | Programming | 5 | 11-02-2006 09:21 |
| Camera not working | st1nkm4n | Programming | 7 | 02-02-2006 08:22 |
| Camera stops working when we use camera_set_servos()... | SeanCassidy | Programming | 16 | 13-02-2005 03:08 |