|
Re: Hall Effect Sensor.
Hey, Stu, it's Christine. I did some calculations.
Wheel radius = 4", Robot speed = 10 ft/sec, gear by sensor has 45 teeth
2 * pi * 4" / revolution
* 1 revolution / 45 teeth
* 1 sec / 120 "
* 1000 mSec / sec
= 4.65 mSec / tooth
In other words, you can't do this by polling the sensors in a 26 mSec cycle, and you probably can't do it in the fast cycle either.
I think the right way to do this is to hook the sensors to a digital counter and poll the counter. I could be wrong. I don't know squat about counters, it's after midnight, and I can't remember how quickly the fast code cycles.
I won't be there this weekend. See you all Monday.
|