|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
EasyC for FRC: Drive and Auto Track Camera Code
Autonomous - Robot rotates to the center of the green
target. Operator Control - Drives in arcade mode as normal and when the trigger is pulled on the drive joystick the robot will disable arcade drive and rotate to center itself. This program has victor scaling in the drive function. This makes the victors act in a more linear fashon. |
|
#2
|
||||
|
||||
|
Re: EasyC for FRC: Drive and Auto Track Camera Code
Adam
When using EasyC for FRC, can one issue a Track_Color() command to the camera to change the tracking values without restarting the camera? Jon |
|
#3
|
||||
|
||||
|
Re: EasyC for FRC: Drive and Auto Track Camera Code
The best way to change colors is to send:
StopCamera(); InitCamera(2); StartCamera(); Where "2" would be the second table you define in the Camera Setup. Last edited by Kingofl337 : 28-12-2006 at 19:20. |
|
#4
|
||||
|
||||
|
Re: EasyC for FRC: Drive and Auto Track Camera Code
So this will be about a 2-second delay to switch colors?
|
|
#5
|
||||
|
||||
|
Re: EasyC for FRC: Drive and Auto Track Camera Code
Roughly...Yes
But, the robot should keep driving during the switch. Last edited by Kingofl337 : 28-12-2006 at 15:32. |
|
#6
|
|||
|
|||
|
Re: EasyC for FRC: Drive and Auto Track Camera Code
Quote:
What happens is that the code waits for the robot to be on for 2 seconds before it will send any initialization data to the camera. This is to ensure that the camera has powered itself up. Your program can do other things during that 2 seconds, but the InitCamera function will wait (inside the function) until the camera is properly powered up. Once that happens, the actual initialization takes about 50ms. So you can stop the camera, send it new initialization data, and restart in under 100ms for everything. The 2 second delay only applies to the first time. Brad |
|
#7
|
||||
|
||||
|
Re: EasyC for FRC: Drive and Auto Track Camera Code
Brad
Thanks for the clarification Have a great New Year! Jon |
|
#8
|
||||
|
||||
|
Re: EasyC for FRC: Drive and Auto Track Camera Code
I will be combining this code and the 2007 kickoff code shortly.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problems Combining Camera Code and Driving Code | cmurdoch | Programming | 20 | 10-02-2007 16:34 |
| Cmucam + track color + auto servo mode | kheops1982 | Programming | 5 | 09-04-2006 13:32 |
| Update for EasyC for FRC Available | Kingofl337 | Programming | 0 | 07-03-2006 14:42 |
| FRC Camera code in YCrCb Mode? | Terry Sherman | Programming | 9 | 25-01-2006 16:43 |
| Team THRUST - Kevin's Code and Camera Code Combine | Chris_Elston | Programming | 3 | 31-01-2005 22:28 |