Pages: [1]   Go Down
Author Topic: New Ping  (Read 375 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8108
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 241
Posts: 24470
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

"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.

Pages: [1]   Go Up
Jump to: