|
Re: FTC 2012 RobotC IR Sensor Programming and implementation
The signal strengths are positive numbers .. maybe in the 0-100 range.
You don't need to do any math per-se...
The only time you are interested in the 5 discrete sensor values is when you are ON a narrow beam (2,4,6,8).
Then all you do is look at the relative strength of the two adjacent IR sensors... this just tells you which side of center, the beacon is.
Here's what I did the first year we used the IR seeker...
Made a compass out of paper (with degree markings)
Mounted the compass and IR Seeker on a camera tripod so I could spin it.
Mounted an IR beacon on a wall in front of the tripod.
Wrote an NXT program to read the seeker and display the Beam number and 5 signal strenghts.
Sat on the floor and slowly rotated the tripod head and watched the numbers changing.
You can learn a LOT this way. We discovered the whole 5 Deg, 60 deg thing way before they published the white paper. We could auto aim and shoot wiffle balls into the spinning goal from the corner of the field.
I personally think Hitechnic missed the boat on this one, and should do a Seeker V3 that has 4 IR receivers centered on "forward" so the 5 Deg beam is centered, rather that 30 Deg off to one side.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org
FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
|