|
Re: How do YOU find the distance from the light?
Team 1286 never really used a distance table, just the tilt angle position in counts (0 to 254). I found that the tilt angle position was about 170 counts at the starting position. Near the rack, with the camera locked on the counts increased to about 192 counts. So, the main part of the program drove forward, slowly, let's say 160 forward pwm counts (we have a tank tread design and lot's of friction) the entire 15 seconds. Next , a lookup table was used to subtract from the pwm counts as tilt angle changed. So, let's say the table at 170 counts gave 0 (no change) and at 192 counts gave 15 counts (enough to stop the robot).
As the robot moves forward, the tilt angle position in counts subtracts more and more from the forward pwm counts (160, 159, 158 to 145) which stops the robot.
__________________
Marc Center 
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377
|