Log in

View Full Version : Adding Code


haywirerobotics
17-01-2006, 21:32
In the Process Data From Master uP section with the camera code, where do you add your out codes?

Jake M
17-01-2006, 21:44
Out codes? Did you mean to say 'own'? And if so, what kind of codes do you mean? If you mean code that adjust your robot's position based on the camera data, you could either work it into the Servo_Track() routine, or, if you feel daring, you could write your own routine based on Servo_Track(). Or again, you could get rid of the Servo_Track() function and put the code straight into Process_Data_From_Master_uP, after Camera_Handler().

Ryan M.
18-01-2006, 07:04
Generally, you'll be adding code the the end of Process_Data_From_Master_uP(), but before the call to putdata(). The nicest way to do this is to define new functions and call them, but you can add actual working code without doing that if you feel the need.