Multiple pings in one project?
jeff2.0
Posts: 24
Hi all.
I have a project where I need to stack 7 ping units·above each other pointing straight out,·each·about 1 foot apart.
My question is, "Will they conflict with each other in some way?"
Here's a text drawing showing the arrangement.
Ping
>
·(each about one foot apart)
Ping
>
Ping
>
Ping
>
Ping
>
Ping
>
Thanks in advance.
jeff
·
I have a project where I need to stack 7 ping units·above each other pointing straight out,·each·about 1 foot apart.
My question is, "Will they conflict with each other in some way?"
Here's a text drawing showing the arrangement.
Ping
>
·(each about one foot apart)
Ping
>
Ping
>
Ping
>
Ping
>
Ping
>
Thanks in advance.
jeff
·
Comments
Post Edited (Mike Green) : 1/14/2010 3:34:58 AM GMT
Would what you said still be the case?
Just out of curiosity, what are you doing?
-Phil
I'm re-building a game for a client that has a bunch of cut in half basket balls mounted on a wall above each other.
The player jumps as high as they can, sticking their hand up in front of (or touching) the highest ball possible.
Currently the game has photo-electric light sensors mounted in a little hole in the middle of each ball which works OK if you know where to put your hand. People are dumb however and can't figure out that they must cover the little hole to win.
So...I would like to put pings under each ball to sense a hand passing in front of it so that the players can trigger the highest ball easier.
I love my job.
I have already done a quick mockup with one ping that is programmed to trigger an output pin if an object is < 3 inches which works great. It's very quick and it sees my hand just fine.
As long as you guys are helping me let me throw this at you.
I'm having trouble thinking through the logic on the ball thingee.
When I reach the highest ball that I can, then I want to ignore the other lower ones that I triggered on the way up to the highest one. Would that be some form of an If,Then Else statement? Sort of like........
IF ballone is reached THEN x ELSE IF balltwo is reached THEN y ELSE IF ballthree is reached THEN z etc......?
Any ideas?
Thanks for all your help.
jeff
You may have to experiment if a ping sensor will reflect from the end of his hand. You might even put a plate with a switch on it on the ground, that he'll jump off from, to tell your system when to start looking for a signal.
That 'reflect off his fingertips' might be a show-stopper for this approach -- I'm sure you could 'see' his head, but really you want his finger-tips.
I will set up a test and see.
Cool idea, thanks.
j
I used the waiting period of the winning output·to keep checking the other higher inputs.
I didn't really understand how to do the array so I got it to work this way.
' {$STAMP BS2}
' {$PBASIC 2.5}
'work on·BALL GAME logic.
'balls 1 through 7's inputs are pins 1 through 7 on stamp
'ball light outputs are outputs are pins 8 through 14
'each·higher ball·can still win aven after a lower ball has won
Setup:
INPUT 1······ 'controls out 8
INPUT 2······ 'controls out 9
INPUT 3······ 'controls out 10
INPUT 4······ 'controls out 11
INPUT 5······ 'controls out 12
INPUT 6······ 'controls out 13
INPUT 7······ 'controls out 14
keepchecking VAR Word
faster6 VAR Nib
faster7 VAR Nib
Main:
LOW 8
LOW 9
LOW 10
LOW 11
LOW 12
LOW 13
LOW 14
DO
IF IN1=1 THEN GOSUB OneWins·· 'sample inputs to find a winner 1-7
IF IN2=1 THEN GOSUB TwoWins
IF IN3=1 THEN GOSUB ThreeWins
IF IN4=1 THEN GOSUB FourWins
IF IN5=1 THEN GOSUB FiveWins
IF IN6=1 THEN GOSUB SixWins
IF IN7=1 THEN GOSUB SevenWins
LOOP
OneWins:
HIGH 8
FOR keepchecking = 1 TO 800
IF IN2=1 THEN GOSUB TwoWins 'sample inputs to find a winner 2-7
IF IN3=1 THEN GOSUB ThreeWins
IF IN4=1 THEN GOSUB FourWins
IF IN5=1 THEN GOSUB FiveWins
IF IN6=1 THEN GOSUB SixWins
IF IN7=1 THEN GOSUB SevenWins
NEXT
LOW 8
RETURN
TwoWins:
LOW 8
HIGH 9
FOR keepchecking = 1 TO 950
IF IN3=1 THEN GOSUB ThreeWins 'sample inputs to find a winner 3-7
IF IN4=1 THEN GOSUB FourWins
IF IN5=1 THEN GOSUB FiveWins
IF IN6=1 THEN GOSUB SixWins
IF IN7=1 THEN GOSUB SevenWins
NEXT
LOW 9
RETURN
ThreeWins:
LOW 8
LOW 9
HIGH 10
FOR keepchecking = 1 TO 1500
IF IN4=1 THEN GOSUB FourWins· 'sample inputs to find a winner 4-7
IF IN5=1 THEN GOSUB FiveWins
IF IN6=1 THEN GOSUB SixWins
IF IN7=1 THEN GOSUB SevenWins
NEXT
LOW 10
RETURN
FourWins:
LOW 8
LOW 9
LOW 10
HIGH 11
FOR keepchecking = 1 TO 2000
IF IN5=1 THEN GOSUB FiveWins· 'sample inputs to find a winner 5-7
IF IN6=1 THEN GOSUB SixWins
IF IN7=1 THEN GOSUB SevenWins
NEXT
LOW 11
RETURN
FiveWins:
LOW 8
LOW 9
LOW 10
LOW 11
HIGH 12
FOR keepchecking = 1 TO 2500
IF IN6=1 THEN GOSUB SixWins·· 'sample inputs to find a winner 6-7
IF IN7=1 THEN GOSUB SevenWins
NEXT
LOW 12
RETURN
Etc....etc....