Shop OBEX P1 Docs P2 Docs Learn Events
Ping mapping — Parallax Forums

Ping mapping

bboy8012bboy8012 Posts: 153
edited 2010-05-15 21:29 in Propeller 1
I was searching around and ran into post·I believe it was on here, that had the Ping sensor, and used it to display what is was seeing through the TV or VGA port. Can anyone point me to that direction. Thanks

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-05-15 14:31
    There's a program for the Basic Stamp called PINGdar (like radar) that uses the DEBUG window of the Stamp Editor for displaying what's seen by a PING on a servo mount for a BoeBot. I believe there's a link to it on the PING product page. I don't know if it was translated to Spin for the Propeller. It shouldn't be hard to do.

    Here's the link: http://forums.parallax.com/showthread.php?p=590115

    Post Edited (Mike Green) : 5/15/2010 2:36:03 PM GMT
  • bboy8012bboy8012 Posts: 153
    edited 2010-05-15 14:34
    Thanks Mike, I shall go look for that, and try and convert it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • bboy8012bboy8012 Posts: 153
    edited 2010-05-15 21:29
    I have this using the ramping,
    PRI pingScan 
      servo.set(pServo, 1500)
      repeat
        SERVO.SetRamp(pServo, 2000, 1000)          'Pan Servo
        repeat 1500000                            'Do nothing here just to wait for background ramping to complete
        SERVO.SetRamp(pServo, 1000, 1000)          'Pan Servo
        repeat 1500000
    

    but I am forgetful and havent coded in awhile how would you do this manually? This is what I have so far
    PRI scan | servoPos
      servo.set(pServo, 1500)
      repeat servoPos from 1500 to 2000 step 200
        servo.set(pServo, servoPos)
    

    Trying to get it to scan the full 180 degrees

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sign In or Register to comment.