dancol90 / ESP8266Ping

Ping library for ESP8266 Arduino core
GNU Lesser General Public License v2.1
261 stars 134 forks source link

Please make ping async #31

Closed sblantipodi closed 11 months ago

sblantipodi commented 4 years ago

As title, pinging requires a lot of time with this lib.

Is it possible to make it async?

skorokithakis commented 4 years ago

Seconded, I want to do some work while the library is pinging and right now it's not possible.

maiksicks commented 3 years ago

@sblantipodi You could call Ping.ping(host, 1); to only send one ping request. This works quite fast.

sblantipodi commented 3 years ago

@sblantipodi You could call Ping.ping(host, 1); to only send one ping request. This works quite fast.

I'm running a stepper motor, this cause huge rattle

ziqbal commented 3 years ago

@skorokithakis @sblantipodi You all probably figured it out but I had this same issue past week and resolved it by using another library: AsyncPing It works a treat.

skorokithakis commented 3 years ago

@ziqbal Hey Zafar! Long time! Thanks for the tip, I'll use that.

sblantipodi commented 3 years ago

@maiksicks it's fast but if you are driving a stepper motor on a single core microcontroller it creates a rattle every time you do a ping. :) Not an enormous issues but an async call could be cool.

sblantipodi commented 11 months ago

@dancol90 wow you close this issue, can I ask you how to "make it async"? should I change somethig in my code?

is the bool ret = Ping.ping("www.google.com"); now async?

maiksicks commented 11 months ago

@sblantipodi What about this? :)

47