WiFinder automatically connects your Espruino to one of your predefined networks.
- Navigate to the Modules folder of your ESPRUINO WEB IDE
- npm install wifinder
- move the WiFinder.js to the Modules root folder
- Enable 'Load modules from NPM' inside the ESPRUINO WEB IDE (Settings > Communications)
var WiFinder = require('WiFinder');
var wifis = [{ ssid : 'net1', pwd : 'netOne' },
{ ssid : 'net2', pwd : 'netTwo' }];
WiFinder(wifis, function(err, theConnectedAp){
... do something after connected or error
});
http
MIT