|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#5
|
||||
|
||||
|
Re: Camera without servos
Okay, I have something mocked up now.. How does this look??
if (swt_camera) { // If the image is not center, check with the allowable error range if (pan_error > PAN_ALLOWABLE_ERROR_DEFAULT) { // Attempt to turn left pwm_rightDrive_cim = pwm_rightDrive_cim = 200; pwm_leftDrive_cim = pwm_leftDrive_fp = 120; } else if(pan_error < -1 * PAN_ALLOWABLE_ERROR_DEFAULT) { // Attempt to turn right pwm_rightDrive_cim = pwm_rightDrive_cim = 120; pwm_leftDrive_cim = pwm_leftDrive_fp = 200; } else { // Set drive motors to neutral pwm_rightDrive_cim = pwm_rightDrive_cim = 127; pwm_leftDrive_cim = pwm_leftDrive_fp = 127; // Tell the controller that it is now on target ![]() Tracking_State += STATE_PAN_ON_TARGET; } } Should this work? |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Camera shows no love to drive motors | anifinder | Programming | 4 | 13-02-2006 10:31 |
| How To Use the Google Camera | generalbrando | Kit & Additional Hardware | 2 | 07-02-2006 16:00 |
| Servos controlling camera and purple screen | ryan_f | Programming | 6 | 17-01-2006 23:21 |
| servos and the camera | incognito_NICK | Programming | 5 | 09-02-2005 00:00 |
| Servos for the camera | MV_Hirsch | Programming | 4 | 24-01-2005 16:35 |