• Very strange. I updated one of my boards to 1v93 and it still doesn't respond on port 80. The other board won't go in to flashing mode.

    One thing I noticed, I was having problems with the neopixel library too. It seemed to think I was trying to use an SD card and was not loading the library. However with the update neopixel now works.

    Here is my latest code:

    // Neopixel Matrix Controller
    // 3rd August 2016
    // Sean Clark
    // HTTP Version
    
    var WIFI_NAME = "Kraken";
    var WIFI_OPTIONS = { password : "xxx" };
    var MATRIXPIN = B5;
    var MATRIXSIZE = 256;
    var SERVERIP = "192.168.1.101";
    
    var wifi;
    var config = {
      'Title': 'Test Piece',
      'Network': WIFI_NAME,
      'macaddress': '',
      'ipaddress': '',
      'type': 'neopixel',
      'width': 16,
      'height': 16
    };
    
    var matrix = new Uint8ClampedArray(MATRIXSIZE*3);
    
    function processRequest(req,res) {
      console.log(req);
      res.writeHead(200, {'Content-Type': 'text/plain'});
      res.end("Hello World");
    }
    
    function onInit() {
      neopixel = require("neopixel");
      neopixel.write(MATRIXPIN,[255,255,0]); // On
      wifi = require("EspruinoWiFi");
      wifi.connect(WIFI_NAME, WIFI_OPTIONS, function(e) { 
        if (e) {
          console.log("Connection Error: "+e);
          neopixel.write(MATRIXPIN,[255,0,0]); // Connection Error
          return;
        }
        wifi.getIP(function(f,ip) {
          config.macaddress = ip.mac;
          config.ipaddress = ip.ip;
          console.log("Connected: ",config);
          require("http").createServer(processRequ­est).listen(80);
          neopixel.write(MATRIXPIN,[0,0,255]); // Connected
        });
      });
    }
    
    onInit();
    
About

Avatar for seanclark @seanclark started