You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • require("CC3000") itself returning a blank function is expected. When you run the code from http://www.espruino.com/CC3000 nothing gets printed until the result is received... Try:

    console.log("Initialising CC3000");
    var wlan = require("CC3000").connect();
    console.log("Connecting...");
    wlan.connect( "AccessPointName", "WPA2key", function (s) { 
      console.log(s);
      if (s=="dhcp") {
        require("http").get("http://www.pur3.co.uk/hello.txt", function(res) {
          res.on('data', function(data) {
            console.log(">" + data);
          });
        });
      }
    });
    console.log("Done.");
    

    And see what happens. It's possible that your Access Point's name or key isn't being recognized.

About

Avatar for Gordon @Gordon started