Go Down

Topic: New Ping (Read 1 time) 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: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

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.
I speak for myself, not Arduino.

Go Up