Shop OBEX P1 Docs P2 Docs Learn Events
Direction finding with a compass(CMPS03) — Parallax Forums

Direction finding with a compass(CMPS03)

aliceralicer Posts: 2
edited 2005-09-28 23:40 in Robotics
Uh...At first,English is not my nature tongue. blush.gif So I am sorry for my poor vocabulary ,grammers,and punctution.

My Question is I have no idea how to find direction with a compass,even I can enable compass module. Beacasu the value(heading angle)from compass is not one I can control, I can't use it to write an avoiding wall loop. Or maybe I'm only a lousy programmer .
But I really need some help now.

My project is just a roaming boe-bot with avoiding ability..sigh.

Thanks your watching, any opinions will be grateful. smile.gif
Alicer

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-28 21:33
    English IS my native tongue and I still trip all over it, so don't worry.

    This article does not have Boe-Bot code per se, but it does show how to read direction from the CMPS-01, maybe it will help.

    http://www.parallax.com/dl/docs/cols/nv/vol3/col/nv85.pdf



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-09-28 21:40
    Alicer -

    Here is a link to the Compass Sensor that Parallax sells, and there is sample code near the bottom of the web page that can be downloaded:
    http://www.parallax.com/detail.asp?product_id=29123

    That should give you a basic idea of how the Parallax unit works. It offers 128 points of reference in a serial format which can be input to any PBASIC Stamp by using the SERIN command.

    BTW - Your English is fine!

    Regards,

    Bruce Bates
  • aliceralicer Posts: 2
    edited 2005-09-28 23:40
    Thank for your help.
    But my question is I dont know how to use the angle I read from compass. I mean how to use the signal (e.g. degree=217.5) to make my boe-bot find out its direction
    (Somthing about robot's avoiding path or original path..bahbah etc.) .
    I find a document about position robot. [noparse][[/noparse]96Ver.] "Where am I?Sensors and Methods for Mobile Robot Positioning",University of Michigan
    But the Document doesn't profit our small boe-bot.
    I want to discuss with how to make use of the signals just like IR signals.
    In brief,I can use IR signals to avoiding obstacles but apperantly they are not enough for a boe-bot runing routine or escaping
    maze.
    My last sentense make my roommate laugh because he can do these just using 4 IR headlight.
    smile.gif
    Alicer



    I have already known how to enable(start) the compass using I2C bus.
    www.robot-electronics.co.uk/htm/cmps2bs2.shtml

    Post Edited (alicer) : 9/29/2005 6:46:07 PM GMT
Sign In or Register to comment.