Why not call each of your modules from inside the 'connected' function once connected?
This would remove the need to 'pass' the concept of connected to each individual module, as each is only called once 'inside' the on-connected function. Ref Weather Station example above
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Thought that the gist ref #16 of just having one WiFi instance and using a server might replace what you had intended.
Do any of these spark some ideas?
http://www.espruino.com/Pico+Weather+Station
http://www.espruino.com/wifi_humidity
http://www.espruino.com/WiFi+Enabled+Thermometer
from:
http://www.espruino.com/Tutorials
Why not call each of your modules from inside the 'connected' function once connected?
This would remove the need to 'pass' the concept of connected to each individual module, as each is only called once 'inside' the on-connected function. Ref Weather Station example above