Shop OBEX P1 Docs P2 Docs Learn Events
guide to installing ping sensor onto boebot board of education? — Parallax Forums

guide to installing ping sensor onto boebot board of education?

iloverobotsiloverobots Posts: 14
edited 2011-03-13 16:26 in Accessories
I am using the board of education version D and I want to add the ping sensor I just got onto it. I want to use just the three prongs and not the bracketing system. Is there a guide to this or any suggestions what to do? Thanks :)

Comments

  • Mike GMike G Posts: 2,702
    edited 2011-03-10 17:36
    Just plug the PING into the BOE development area and run jumper wires?
  • PublisonPublison Posts: 12,366
    edited 2011-03-10 17:53
    If you go to the Ping product page:

    http://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/catpageindex/2/ProductID/92/Default.aspx?txtSearch=BOE+Ping

    There is an area in the lower right for "Download and Resources"

    Many examples are there including this one:

    http://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/catpageindex/2/ProductID/92/Default.aspx?txtSearch=BOE+Ping


    I am using the board of education version D and I want to add the ping sensor I just got onto it. I want to use just the three prongs and not the bracketing system. Is there a guide to this or any suggestions what to do? Thanks :)
  • iloverobotsiloverobots Posts: 14
    edited 2011-03-12 17:50
    I followed the instructions that parallax gives for testing the ping sensor and my output was 0000 when it wasn't supposed to be. I followed the program and tried to run it, but it didn't work. Any ideas on what went wrong? I have my jumpers all connected and the ping installed on the breadboard. would you like a photo of it?
  • FranklinFranklin Posts: 4,747
    edited 2011-03-12 18:44
    Yes, good clear photos and attach your actual code you loaded into the stamp.
  • iloverobotsiloverobots Posts: 14
    edited 2011-03-12 22:14
    IMG_0629.jpg
    IMG_0627.jpg
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    
    sing VAR Word
    FREQOUT 4,4000,3000
       detect VAR Word
    pulseW VAR Word
    counter VAR Word
    pulseWC VAR Word
    time VAR Word
    FOR counter = 1 TO 100
    PULSOUT 13, 650
    PULSOUT 12, 650
    PAUSE 20
         NEXT
         DO
         PULSOUT 15,5
         PULSIN 15,1,time
         DEBUG HOME, "time = ", DEC5 time
         time = time ** 2251
         DEBUG CR, "Distance = ", DEC4 time, " cm"
         PAUSE 100
         LOOP
    END
    

    Please help. Thanks!
    1024 x 765 - 134K
    1024 x 765 - 104K
  • iloverobotsiloverobots Posts: 14
    edited 2011-03-12 23:35
    IMG_0629.jpg
    IMG_0627.jpg
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    
    sing VAR Word
    FREQOUT 4,4000,3000
       detect VAR Word
    pulseW VAR Word
    counter VAR Word
    pulseWC VAR Word
    time VAR Word
    FOR counter = 1 TO 100
    PULSOUT 13, 650
    PULSOUT 12, 650
    PAUSE 20
         NEXT
         DO
         PULSOUT 15,5
         PULSIN 15,1,time
         DEBUG HOME, "time = ", DEC5 time
         time = time ** 2251
         DEBUG CR, "Distance = ", DEC4 time, " cm"
         PAUSE 100
         LOOP
    END
    
    Please help. Thanks!
    I tested the code on setting one. I didn't want to turn it to two, because then the wheels would've started going crazy. Could have this posed an issue?
  • FranklinFranklin Posts: 4,747
    edited 2011-03-13 13:55
    Start by getting valid data from the ping. Remove all other code so you don't have to worry about that. Let us know what values you get from the ping (use debug statements)
  • PublisonPublison Posts: 12,366
    edited 2011-03-13 16:26
    If you have the PING plugged into P15, you will need to put the power switch into position 2 to supply power to the PING, (and the servos).

    I have attached a program to just test the PING without the servos. See if that works before you add the servos into the program.

    I tested the code on setting one. I didn't want to turn it to two, because then the wheels would've started going crazy. Could have this posed an issue?
Sign In or Register to comment.