 /**
- * A small project at the request of my friedn and colleague @ffeldmann
- * This is an arduino sketch that runs on the Arduino Yun.
- * This project shows a webpage where people can press the "BullShit" button which in turns will trigger an alarm and light some pixels
- * 
- * BSDetector is a microservice accessible as a REST endpoint - seriously :)
- * REST endpoints can be (GET) called over http as follow
- * "http://${ARDUINO_IP}/arduino/bs/0"     -> set BS allarm off
- * "http://${ARDUINO_IP}/arduino/bs/1"     -> set BS allarm on
- * "http://${ARDUINO_IP}/arduino/health"   -> returns info on how many times one calls bullshit, plus other thinks
- * 
- * @author Bruno P. Georges
- */
+   A small project at the request of my friedn and colleague @ffeldmann
+   This is an arduino sketch that runs on the Arduino Yun.
+   This project shows a webpage where people can press the "BullShit" button which in turns will trigger an alarm and light some pixels
+
+   BSDetector is a microservice accessible as a REST endpoint - seriously :)
+   REST endpoints can be (GET) called over http as follow
+   "http://${ARDUINO_IP}/arduino/bs/0"     -> set BS allarm off
+   "http://${ARDUINO_IP}/arduino/bs/1"     -> set BS allarm on
+   "http://${ARDUINO_IP}/arduino/health"   -> returns info on how many times one calls bullshit, plus other thinks
+
+   @author Bruno P. Georges
+*/
 
 #include <Bridge.h>
 #include <BridgeServer.h>

  }
}


String getIPaddr(){
  String ipaddr;
  Process networkCheck;  // initialize a new process
  networkCheck.runShellCommand("ifconfig br-wan | awk '/inet addr/ {gsub(\"addr:\", \"\", $2); print $2}' ");

  }
  return ipaddr;
}

void sendIP() {
  Process p;
  String link= "http://"+yunAddr+"\/arduino\/bs";
  p.runShellCommand("cat /mnt/sd/mail_header.txt > /mnt/sd/mail.txt");
  p.runShellCommand("echo \""+link+"\" >>  /mnt/sd/mail.txt");
  p.runShellCommand("cat /mnt/sd/mail.txt | ssmtp bruno.georges@gmail.com bruno@redhat.com ffeldman@redhat.com"); //
}

