Shop OBEX P1 Docs P2 Docs Learn Events
Question about PING))) Demo code for BS1 — Parallax Forums

Question about PING))) Demo code for BS1

wandererrobwandererrob Posts: 10
edited 2011-09-29 21:04 in BASIC Stamp
Hi all,

This is a complete noob question. I just got my PING))) and HB25 today for a Halloween project and want to play with them a bit to figure out how they work and such.

I plunked the PING))) BS1 demo code into my Prop-1. The green LED is on, but I see nothing but zeros in the window that comes up in my stamp editor. Should the numbers be changing as an object is in view at varying distances? Seems like it should.

Thanks,

Rob

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-09-29 08:27
    How do you have your PING))) connected to the Prop-1? How are the jumpers set on the Prop-1? Can you furnish a link to the BS1 demo code?

    If you have the PING))) connected to I/O pins 6 or 7, you should leave off the pullup/pulldown jumper since the PING))) has its own pulldown resistor.
  • wandererrobwandererrob Posts: 10
    edited 2011-09-29 09:47
    Ah, the jumper may be the culprit then, as Ieft it on in the "up" position. The code I used, I downloaded directly from the PING))) page http://www.parallax.com/Portals/0/Downloads/src/bs/28015-BScode-v1.4.zip and made no changes.

    I'll pull thejumper tonight and see if that does the trick.

    Thanks!
  • wandererrobwandererrob Posts: 10
    edited 2011-09-29 20:50
    Yup, that was it. I've now got my PING))) working. Thanks!

    Now to figure out the HB25 :D
  • Mike GreenMike Green Posts: 23,101
    edited 2011-09-29 21:04
    Think of the HB25 as a servo motor on steroids. There are some simplifications you can make with an HB25, but most of the programming examples for servos should work with an HB25. Look at the Robotics with the BoeBot tutorial for some BS2 examples. You'd use the same PULSOUT and PAUSE statements on the BS1 although the PULSOUT timing values are different.
Sign In or Register to comment.