Shop OBEX P1 Docs P2 Docs Learn Events
Usage of PNI V2Xe compass — Parallax Forums

Usage of PNI V2Xe compass

El PaisaEl Paisa Posts: 375
edited 2007-06-13 14:53 in Propeller 1
Has any one have done some programming using the propeller with the PNI V2Xe compass?
I am interested in learning how to use this device.

Comments

  • JonathanJonathan Posts: 1,023
    edited 2007-06-12 20:43
    I have. I got it to work using Martin's BS2.Functions. I am planning to make it work with the newer shiftout/in objects sometime in the next couple of weeks. I am back to work on a 'bot that uses the V2XE, but have to finish up a few things before I get to the V2XE.

    I'm not at the machine that has the code. I'll post it when I get home. You may want to try it using the shiftin/out objects. I had some issues, somewhat cloudy now (the 'bot has been back burnered for almost a year) that caused me to have to toggle the power to the compass sometimes to prevent it hanging. There is also something odd about inverted data or something, I can't remeber exactly. It affected the BS2P and the Prop, but not the BS2. I had many talks with PNI and sent them copies of the Prop and Bs2P code, you may be able to find it on their website.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • JonathanJonathan Posts: 1,023
    edited 2007-06-13 14:53
    Here is the code. Don't laugh, I'm not a brilliant coder. It is somewhat commented, but feel free to ask any questions, I *might* remember what I did. Also included is a few extra's, like a routine to determine which way is shortest to turn to reach a particular heading, i.e. if you are facing say 280 degrees and want to turn to 290 degrees, you want to go clockwise etc.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
Sign In or Register to comment.