Shop OBEX P1 Docs P2 Docs Learn Events
Help with PING))) for project — Parallax Forums

Help with PING))) for project

RonPRonP Posts: 384
edited 2010-01-06 17:32 in Accessories
Hello All,

My project is using a PING))) Sensor to detect if people are present to turn on a few things in short. More Later.

My problem is that the ultrasonic sound bounces differently of different material "i wasn't expecting that". I haven't really played with my stamps or boe-bot for about 3 years so pretty rusty was never really good at in the first place. Need help time is running out for this project. The project is going into a RC Scale Helicopter for a friend of mine that will be on static display at this years AMA Expo in Ontario, CA this weekend in fact. Basically the PING))) sences if people are present and turn on a few things Lights, Windshield Wiper Servo(continuous rotation) and a Search Light Servo(standard servo).

What i think i need is some way to count if the PING))) get's hit like 10 times or something then turn stuff on, so that it doesnt get hit by people walking by someone would have to be standing there looking at the Heli.

Thanks in advance for your HELP and suggestions.

Program is very sloppy now sorry but need to get this Posted.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Im not that bright and i can prove it.

Comments

  • RonPRonP Posts: 384
    edited 2010-01-06 16:25
    Here is the Program cleaned up a little.

    Right now if the PING))) senses something at 20 in it turns things on. Need to do something to make it not turn on until i senses something like 10 times, within a given period of time.

    Thanks again for and HELP.

    Ron Poutre

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Im not that bright and i can prove it.
  • kf4ixmkf4ixm Posts: 529
    edited 2010-01-06 16:52
    i would try using a counter then goto type directive...

    like if inches < zone1 then gosub·timer

    timer:

    if inches > zone1 then time = 0 ' reset the wait time if target goes out of range

    pause 1000

    time = time +1

    if time = 10 then goto activate

    else goto timer

    activate:

    ' what you want to do

    of course this is not workable code, but hopefully you see what im getting at here. i would start with this idea·and see what it does.
  • RonPRonP Posts: 384
    edited 2010-01-06 17:32
    Thanks Very Much kf4xim time it running out for me, working on it now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Im not that bright and i can prove it.
Sign In or Register to comment.