However when you do the require, the board will stop responding for maybe as much as 10 seconds while the CC3000 initialises (it shouldn't actually disconnect though). It's annoying, but it's just the way TI's driver works :(
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.
It just disconnects from USB? Which board do you have, the Pico or the original?
I just tried the following here on the original board and it works fine for me:
````
var wlan = require("CC3000").connect();
wlan.connect( "AccessPointName", "WPA2key", function (s) {
if (s=="dhcp") {
}
});
```
However when you do the require, the board will stop responding for maybe as much as 10 seconds while the CC3000 initialises (it shouldn't actually disconnect though). It's annoying, but it's just the way TI's driver works :(