Go Down

Topic: New Ping (Read 545 times) previous topic - next topic

SamKirkiles

I would like to use the new ping library to make the sensor take pings and assign them to different variables. How would I do that? All I know how to do now is to make one ping. I want it to ping in 5 directions and compare the pings.

johnwasser


I want it to ping in 5 directions.


With 5 pingers or with one pinger you can point in different directions (typically with a hobby servo)?
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

AWOL

Quote
All I know how to do now is to make one ping. I want it to ping in 5 directions and compare the pings.

Make an array of five ping objects, and use a "for" loop to iterate through, or if you've only got one ping and a servo, make an array of whatever datatype the ping range method returns.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Go Up