Shop OBEX P1 Docs P2 Docs Learn Events
Storing Data With Ping)) — Parallax Forums

Storing Data With Ping))

dirtrider444dirtrider444 Posts: 33
edited 2011-10-20 10:41 in General Discussion
Hey guys

Im trying to figure out how to store data with my ping)) ultrasonic range finder. My books show me how to do it with photoresistor but not an ultrasonic. I put a servo on my boe-bot(BS2 chip) so I can have the servo rotate the ping sensor left, then right, and determine which distance is greater and go that way. My book only demonstrates how to do it with the photoresistors, but not with the ultrasonic. Any simple codes or info for me that can help me on storing data?
Thanks!

Taylor

Comments

  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2011-10-20 07:03
    May you please specify what book and what microcontroller you are using?
  • Mike GreenMike Green Posts: 23,101
    edited 2011-10-20 07:11
    Also, what do you mean by "store data"?

    As with most Parallax products, there are a variety of links to sample programs and documentation on the webstore page for each product. Have a look at the Parallax webstore page for the PING))). There's a link to "Roaming with the PING" that shows how to use a servo to scan the environment using a PING and use the data to control the BoeBot to explore its environment.
  • RDL2004RDL2004 Posts: 2,554
    edited 2011-10-20 07:59
    If you use the program RoamingWithPING-V1.0 be aware that it is a modified version of the "Roaming with IR" and assumes you still have the IR roaming setup (LEDs and receiver) installed on your BoE-bot. You will need to make changes if you have removed them. It also requires the Ping mounting bracket.
  • dirtrider444dirtrider444 Posts: 33
    edited 2011-10-20 08:17
    RDL- Thats exactly what I ran into. The data is stored and read differently than what I need it to as well as the fact I didnt go out and purchase the actual mounting bracket that Parallax offers and Im not using Parallax servo. Although the information is good referance, its confusing more because Im trying harder to figure out what is the "IR" part, what is the "Ping" part, and what is the Parallax mounting part.

    Microcontrolled- Apologize for the briefness of the question. I am using a boe-bot board, BS2 stamp, Ping)) UltraSonic RangeFinder, and a Hitec Micro Servo "HS-505MG". Servo works great, general program works pretty well right now. Just trying to have my robot not be a "bumper-kart" lol Oh and the book im using for reference is "Robotics with the Boe-Bot" by Andy Lindsay

    Thanks Guys!
    '
  • Mike GreenMike Green Posts: 23,101
    edited 2011-10-20 09:19
    You don't need Parallax's mounting bracket and servo as long as you have a standard servo mounted to the BoeBot along with some kind of bracket to hold the PING))) so that it rotates with the servo shaft through about a 180 degree sweep.
  • dirtrider444dirtrider444 Posts: 33
    edited 2011-10-20 10:14
    Do you have a "Ping)))" code with no "IR" substance in it?? Ill read up on what everything is and its meaning but do you know of a code I can learn from?
  • Mike GreenMike Green Posts: 23,101
    edited 2011-10-20 10:41
    The PING))) Documentation has the simplest example of reading a distance measurement and converting it into inches in a variable.

    You can take the Roaming with PING))) code and strip out the code that deals with the IR sensors. Start with the first FREQOUT statement and delete lines through the first ENDIF. If you want, you can delete the declarations for irDetectLeft and irDetectRight as well.
Sign In or Register to comment.