Sorry, but I don’t understand how WiFi.listening() works.
It seems that when I execute WiFi.listen() the loop blocks.
So where can I check WiFi.listening()?
I would like to blink an external LED in a ‘listening mode’ manner similar to the RGB on the Particle device.
Hi @steelydev not sure if you are using a core or photon but yes listening mode is definitely blocking.
Not sure how WiFi.listening() would be useful either but there are a few ways to solve this problem
If you are on the photon see Implications of customized system firmware - Photon where @mdma shows a new feature that was added to the photon_043 branch. System event this works great for what you need.
If you are on a core the task is much more of a workaround. You can setup a timer based ISR that is enabled when you clear credentials this ISR would toggle your LED using @peekay123 timer library.
Good Luck.
mdma
July 14, 2015, 5:00pm
3
WiFi.listening()
is intended to be used from an interrupt, such as a timer interrupt.