Shop OBEX P1 Docs P2 Docs Learn Events
Ping Distance Sensor — Parallax Forums

Ping Distance Sensor

kbrown0612kbrown0612 Posts: 1
edited 2013-09-01 19:36 in Accessories
Hi,

I am a newbie and I'm trying to move around with my Ping sensor, but my robot isn't moving forward. Can anyone help? :zombie:

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-08-21 10:28
    If you want help, you have to provide information about how you have things hooked up (a schematic is best ... as an attachment to a posting), your program (as an attachment ... not cut and pasted), and a description of what works and what doesn't work. If it doesn't work, what does it do? Use the "Go Advanced" button below the reply box to get to the Attachment Manager for uploading stuff. The examples provided for the Ping and the BoeBot on Parallax's website do work. A good starting point is to carefully compare your wiring to what's described in the examples and to compare your code to what's provided. Usually problems occur in the differences between the two.
  • McVay6McVay6 Posts: 1
    edited 2013-09-01 17:28
    I have the LCD and Ping connected. It works nice. I am trying to figure out some programming to use this setup as also a counter. A count goes up by one for each cycle of the ping distance sensor. The cycle is the Sensor is further than 320 and does nothing until it detects something less than 320 and increases the count by one then when the sensors is further than 320 it resets and waits for the next vehicle to be less than 320 and increases the count by 1. I am not sure how to add this to the program to get it to work correctly. each time I added some to the program the count starts but will not stop.

    Thank you if you are able to help.

    Randall
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-09-01 19:36
    McVay6 wrote: »
    I have the LCD and Ping connected. It works nice. I am trying to figure out some programming to use this setup as also a counter. A count goes up by one for each cycle of the ping distance sensor. The cycle is the Sensor is further than 320 and does nothing until it detects something less than 320 and increases the count by one then when the sensors is further than 320 it resets and waits for the next vehicle to be less than 320 and increases the count by 1. I am not sure how to add this to the program to get it to work correctly. each time I added some to the program the count starts but will not stop.

    Thank you if you are able to help.

    Randall

    As Mike Green pointed out, you need to post your code in order for us to know what you're doing. Follow Mike's directions and attach your code to a post.
Sign In or Register to comment.