Shop OBEX P1 Docs P2 Docs Learn Events
Odometry, any one have code for the 12v Wheel kits? — Parallax Forums

Odometry, any one have code for the 12v Wheel kits?

DgswanerDgswaner Posts: 795
edited 2010-03-01 22:39 in Propeller 1
I've searched the forum and didn't find anyone who has working code. Does anyone have code that will do odomerty for the 12V motor controllers?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DGSwaner

"When in doubt, use C4" - Jamie Hyneman, Myth Buster

Comments

  • Tired2Tired2 Posts: 29
    edited 2010-03-01 22:39
    I have used this:

    Motor Minder:
    http://obex.parallax.com/objects/98/

    I'm not sure what motors you are talking about, but some more info might yield better responses to this question from other members.

    As stated in the object description, you can run this on any motor encoder that outputs one pulse per revolution, so many types of encoders will work. I used the melexis hall effect sensor sold by parallax.

    The speed is given in RPM 0.1 accuracy, and the count is the number of counts since last reset... pi * Diameter of tire = linear distance traveled, so for a 6" tire outer diameter, you'd get 6 * 3.14159 = 18.84 inches per revolution. Multiply that by the number of counts, and you get a distance (odometer). Divide it out to get feet, miles, etc.
Sign In or Register to comment.