• I'd look at the existing ESP8266 module. Down the bottom there are a list of functions... createAP, getAPs, connect, etc. It'd be nice to make those consistent - whether we're running on the ESP8266 or just using it as a separate module.

    I've tried to arrange that the calls are at least named the same in ESP8266 and CC3000 (and WIZnet where functions are shared), although in the ESP8266 module everything uses callbacks, which is something I think we should stick with.

    As far as a built-in variable for ESP8266, I'd say don't do this. I tried it for the LCD on the 'HY' boards that have built in LCDs, and it was actually really ugly. Using require would definitely be a way to make the ESP8266 support fit in with everything else, and still having the connect() function could be useful - for instance it could actually initialise the WiFi adaptor (which you might not want to initialise by default). In the future it could take an object where you could specify things such as transmit power - so if you were doing a project where you knew you couldn't supply the full 400mA, you could specify that even before WiFi booted up.

    Implementing the actual API shouldn't be too hard. I've already split everything out in this directory so it'll just be a matter of making your own ESP8266 directory and filling in the relevant bits.

About

Avatar for Gordon @Gordon started