anchor.diff:                  });
                 }
   
  -              wifi.on('connect', function(err, data){
  +              wifi.on('connect', function(data){
                   // you're connected
  -                console.log("connect emitted", err, data);
  +                console.log("connect emitted", data);
                 });
   
  -              wifi.on('disconnect', function(err, data){
  +              wifi.on('disconnect', function(data){
                   // wifi dropped, probably want to call connect() again
  -                console.log("disconnect emitted", err, data);
  +                console.log("disconnect emitted", data);
                 })
   
                 wifi.on('timeout', function(err){
                   // tried to connect but couldn't, retry
                   console.log("timeout emitted"); 
  -                connect();
  +                if (timeouts > 3) {
  +                  // reset the wifi chip if we've timed out too many times
  +                  powerCycle();
  +                } else {
  +                  // try to reconnect
  +                  connect();
  +                }
                 });
   
                 wifi.on('error', function(err){
  
positive.code:                 console.log("error emitted", err);
                });
  
  
        .row
          .large-12.columns
  
negative.code:               var network = '#####'; // put in your network name here
                var pass = '#####'; // put in your password here, or leave blank for unsecured
                var security = 'wpa2'; // other options are 'wep', 'wpa', or 'unsecured'
                var timeouts = 0;
  
                function connect(){
                  wifi.connect({
  