Can getRSSI just be a field in getStatus? Seems odd to have a specific function for that one thing.
Maybe onChange should be removed and wifi should just have events emitted on it, so you could do wifi.on('connected', ...)? You can document events via JSON - have a look at jswrap_http (I think).
I know this wasn't in the Wiki version, but someone mentioned about positional parameters to connect and startAP - maybe the password/key should be in options instead, as it's not required if you connect to an insecure network?
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.
Just some thoughts here:
onChange
should be removed andwifi
should just have events emitted on it, so you could dowifi.on('connected', ...)
? You can document events via JSON - have a look at jswrap_http (I think).connect
andstartAP
- maybe the password/key should be inoptions
instead, as it's not required if you connect to an insecure network?