I’m attempting to program a shooting turret based off the TwoColorTrackerDemo provided.
I’ve modified the code so that instead of moving servos on an x and y basis and calculating where they are, all I want to do is use the par.center_mass_x_normalized value (a value between -1 and 1) to set my turrent motor to turn left or right until its centered. So basicly, I’m writing code for a tankl like turret to spin until its centered on the x axis with the target.
The code is attached. The camera isn’t even picking up the image when downloaded to the robot. I’m a novice programmer, but I’m the only one my team has and I figure letting some experts see this will save me a lot of time then my struggling through it for a few extra days that we don’t have.
Thanks!!
TwoColorDemo.zip (3.68 KB)
TwoColorDemo.zip (3.68 KB)