Create balancing_tank.ino

Create balancing_tank.ino

error: pathspec 'ESP8266/Water_Level_Temp/balancing_tank.ino' did not match any file(s) known to git

--- ESP8266/Water_Level_Temp/balancing_tank.ino
+++ ESP8266/Water_Level_Temp/balancing_tank.ino
@@ -0,0 +1,413 @@
+//Project: Monitor water level (HC-SR04P) of Balacing tank and the Temperature of Water (DS18b20) / Ambient (DHT22)
+//         Send alert via Blynk app if water level is too high, or water temperature is higher than 28 C
+
+/*
+//https://community.blynk.cc/t/water-tank-level-indicator-with-low-level-warning-notifications/26271
+
+//v1.0 - Wifi Manager + Blynk
+//v1.1 - added deep sleep function - https://community.blynk.cc/t/esp-deep-sleep/5622/13
+//v1.2 - added run time change of deep sleep interval via UI setup
+//v1.3 -
+
+//**** Blynk Virtual Pin Assignments****
+// V0 - Water temperature alert
+// V1 - Tank Height (cm)
+// V2 - Sensor distance from Tank (cm)
+// V3 - Temperature
+// V4 - Battery voltage
+// V6 - Numeric Widget - Sleep interval (mins)
+// V9 - Level V widget - Water Level %
+//V10 - Numeric Widget - Level exceed then will trigger Alert
+//V11 - Button Widget -  To enable / disable Alert
+//V12 - Distance - height from sensor to water level
+
+Hardware:
+1. Wemos D1 Pro
+2. DS18B20 Temperature Sensor
+3. Ultra Sonic Sensor
+4. 4.7k resistor - put between D4 and VCC
+
+
+Ultra sonic Sensor: Vcc - D7, Gnd - Gnd, Echo - D6, Trigger - D5
+DS18820 - Vcc - D8, Gnd - Gnd, Data - D4
+
+Todo
+----
+- if sonar sensor out of range --> don't save but Alert
+- water temperature alert
+
+*/
+
+#include <OneWire.h>
+#include <DallasTemperature.h>
+#include <ESP8266WiFi.h>
+#include <BlynkSimpleEsp8266.h>
+
+char auth[] = "<blynk toke>";n
+
+char ssid[] = "wifi";
+char pass[] = "pwd";
+
+BlynkTimer timer;
+
+//HC-SR04 ultra sonic sensor
+#define trigPin D5  // Trigger Pin
+#define echoPin D6  // Echo Pin
+#define RadarPowerPin D7 //GPIO12 = D6, GPIO14 = D5, GPIO15 = D8
+
+//DS18820 temperature sensor
+#define sensorPin D4
+#define TempPowerPin D8
+
+#define filterSamples   15              // filterSamples should  be an odd number, no smaller than 3
+
+int alertLevelCounter = 0; //Counter starts at zero
+//int volume1; // for smoothing algorithum
+double wLevel; // for smoothing algorithum
+int levelAlert;
+int wateralert = 0;
+//int sensSmoothArray1 [filterSamples];   // array for holding raw sensor values for sensor1
+int smoothDistance;                     // variables for sensor1 data
+
+//double alertInMin = 0.5;                //Alert time following alert water level being reached (0.5 = 30secs)
+//const int alertDuration = 2;            //Alert sent every 2 minutes
+
+int checkFreq = 2;                //how often run the check / sleep for how long before wake up, in mins
+int tankHeight = 100;             //tank's height
+int heightFrTank = 20;            //sensor distance from tank
+long duration, distance;          // Duration used to calculate distance
+
+//init DS11820
+OneWire oneWire(sensorPin);
+DallasTemperature DS18B20(&oneWire);
+float temp;
+float volt;
+
+BLYNK_CONNECTED() { // runs once at device startup, once connected to server.
+  Blynk.syncVirtual(V1);
+  Blynk.syncVirtual(V2);
+  Blynk.syncVirtual(V6);
+  Blynk.syncVirtual(V10);
+  Blynk.syncVirtual(V11);
+}
+
+BLYNK_WRITE(V1) {
+  tankHeight = param.asInt();
+  Serial.print("\nTank's Height: ");
+  Serial.println(tankHeight);
+  Serial.println();
+}
+
+BLYNK_WRITE(V2) {
+  heightFrTank = param.asInt();
+  Serial.print("Height from Tank: ");
+  Serial.println(heightFrTank);
+  Serial.println();
+}
+
+BLYNK_WRITE(V6) {
+  checkFreq = param.asInt();
+  Serial.print("Sleep Interval: ");
+  Serial.println(checkFreq);
+  Serial.println();
+}
+
+BLYNK_WRITE(V10) {
+  levelAlert = param.asInt();
+  Serial.print("Water Level Alert: ");
+  Serial.println(levelAlert);
+  Serial.println();
+}
+
+BLYNK_WRITE(V11) {
+
+  int alertOff = param.asInt();
+
+  if(alertOff == 0) {
+    resetWaterLevelAlert();
+    wateralert = 1;
+    Serial.print("Level Alert is OFF.");
+    Serial.println();
+  }
+  else {
+    resetWaterLevelAlert();
+    wateralert = 0;
+    Serial.print("Level Alert is ON.");
+    Serial.println();
+  }
+
+}
+
+void resetWaterLevelAlert() {
+  alertLevelCounter = 0;
+  wateralert = 0;
+}
+
+void checkWaterLevel() {
+  Serial.print("Water Level (%) = ");
+  Serial.println(wLevel);
+  Serial.print("Level Alert (%) = ");
+  Serial.println(levelAlert);
+  Serial.print("Alert (1 = off, 0 = on) = ");
+  Serial.println(wateralert);
+
+  if(wLevel > levelAlert && wateralert == 0){
+//    alertLevelCounter += 1;
+    Blynk.notify("Water Tank Level Alert"); // send push notification to blynk app
+
+  }
+
+//  if(alertLevelCounter > alertInMin * 60 && wateralert == 0){
+//    Blynk.notify("Water Tank Level Alert"); // send push notification to blynk app
+//    wateralert = 1;
+//    resetWaterLevelAlert();
+//  }
+}
+
+void MeasureCmForSmoothing() {
+
+  //take multiple reading
+
+  digitalWrite(RadarPowerPin, HIGH);  //provide power
+  delay(1000);
+
+    smoothDistance = mesureDistance();
+
+  digitalWrite(RadarPowerPin, LOW);  //turn off power
+  delay(100);
+
+  Serial.print("Smoothed Distance: ");
+  Serial.println(smoothDistance);
+
+  //tank height 100 cm, sensor is 20 cm above the tank
+  wLevel = (tankHeight + heightFrTank - smoothDistance);
+
+  Serial.print("Water Level (cm): ");
+  Serial.println(wLevel);
+
+  //convert to %
+  wLevel = wLevel / tankHeight * 100;
+
+  Serial.print("Water Level (%): ");
+  Serial.println(wLevel);
+
+  Blynk.virtualWrite(V12, smoothDistance); // virtual pin
+  Blynk.virtualWrite(V9, wLevel); // virtual pin
+  delay(1000);
+}
+
+void UploadMeasureCmForSmoothing() {
+
+  Blynk.virtualWrite(V3, temp); // Water level %
+  Blynk.virtualWrite(V4, volt); // battery
+  Blynk.virtualWrite(V9, wLevel); // Water level %
+  Blynk.virtualWrite(V12, smoothDistance); // virtual pin
+
+}
+
+
+void setup() {
+  Serial.begin(115200);
+  Blynk.begin(auth, ssid, pass);
+
+  pinMode(trigPin, OUTPUT);
+  pinMode(echoPin, INPUT);
+  //pin to provide power to ultra sonic sensor
+  pinMode(RadarPowerPin, OUTPUT);
+
+  //pin to provide power to temperature sensor
+  pinMode(TempPowerPin, OUTPUT);
+
+  Serial.println("Measure Water Temperature");
+  measurementEvent();
+
+  Serial.println("\nMeasure Water Level");
+  MeasureCmForSmoothing();
+
+  Serial.println("Upload Data");
+  UploadMeasureCmForSmoothing();
+
+  Serial.println("check WaterLevel Alert");
+  checkWaterLevel();
+
+  goToSleep();
+
+}
+
+void loop() {
+
+}
+
+int digitalSmooth(int rawIn, int *sensSmoothArray){     // "int *sensSmoothArray" passes an array to the function - the asterisk indicates the array name is a pointer
+int j, k, temp, top, bottom;
+long total;
+static int i;
+// static int raw[filterSamples];
+static int sorted[filterSamples];
+boolean done;
+
+i = (i + 1) % filterSamples;    // increment counter and roll over if necc. -  % (modulo operator) rolls over variable
+sensSmoothArray[i] = rawIn;                 // input new data into the oldest slot
+
+// Serial.print("raw = ");
+
+ for (j=0; j<filterSamples; j++){     // transfer data array into anther array for sorting and averaging
+     sorted[j] = sensSmoothArray[j];
+ }
+
+   done = 0;                // flag to know when we're done sorting
+ while(done != 1){        // simple swap sort, sorts numbers from lowest to highest
+      done = 1;
+        for(j = 0; j < (filterSamples - 1); j++){
+           if(sorted[j] > sorted[j + 1]){     // numbers are out of order - swap
+             temp = sorted[j + 1];
+             sorted [j+1] =  sorted[j] ;
+             sorted [j] = temp;
+             done = 0;
+           }
+        }
+  }
+
+   // throw out top and bottom 15% of samples - limit to throw out at least one from top and bottom
+   //  bottom = max(((filterSamples * 15)  / 100), 1);
+   //  top = min((((filterSamples * 85) / 100) + 1  ), (filterSamples - 1));   // the + 1 is to make up for asymmetry caused by integer rounding
+   bottom = max(((filterSamples * 20)  / 100), 1);
+   top = min((((filterSamples * 80) / 100) + 1  ), (filterSamples - 1));   // the + 1 is to make up for asymmetry caused by integer rounding
+   k = 0;
+   total = 0;
+  for( j = bottom; j< top; j++){
+ total += sorted[j];  // total remaining indices
+ k++;
+ //Serial.print(sorted[j]);
+ //Serial.print("   ");
+ //terminal.print(sorted[j]);
+ //terminal.println("   ");
+
+  }
+   //terminal.print("average: ");
+   //terminal.println(total/k);
+   //terminal.flush();
+   //Serial.println();
+   //Serial.print("average = ");
+   //Serial.println(total/k);
+  return total / k;    // divide by number of samples
+}
+
+int mesureSingleDistance() {
+      long duration, distance;
+
+      digitalWrite(trigPin, LOW);
+      delayMicroseconds(2);
+      digitalWrite(trigPin, HIGH);
+      delayMicroseconds(10);
+      digitalWrite(trigPin, LOW);
+      duration = pulseIn(echoPin, HIGH);
+      distance = (duration/2) / 29.1;
+
+      Serial.print("Distance: ");
+      Serial.println(distance);
+
+      return distance;
+  }
+
+/**
+ * mresure distnce average delay 10ms
+ */
+int mesureDistance() {
+    const int ULTRASONIC_MIN_DISTANCE = heightFrTank;  //20
+    const int ULTRASONIC_MAX_DISTANCE = tankHeight + heightFrTank;  //120
+
+      int i, total_count = 0, total_distance = 0, distance, values[10], average, temp, new_count = 0;
+
+      for(i=0; i<5; i++){
+          distance = mesureSingleDistance();
+          //check if out of range
+          if(distance > ULTRASONIC_MIN_DISTANCE && distance < ULTRASONIC_MAX_DISTANCE) {
+              total_distance += distance;
+              values[total_count++]=distance;
+              Serial.printf("Value %d...\n", distance);
+          }
+      }
+
+      Serial.print("total_count = ");
+      Serial.println(total_count);
+      if(total_count > 0) {
+
+          average = total_distance / total_count;
+          total_distance = 0;
+          Serial.printf("Average %d...\n", average);
+
+          for(i=0; i<total_count; i++){
+              temp = (average - values[i])*100/average;
+              Serial.printf("Analyze %d....%d...\n", values[i],temp);
+              if(temp < 10 && temp > -10){
+                  total_distance += values[i];
+                  new_count++;
+              }
+          }
+
+          if(new_count > 0) {
+//              Serial.print("total_distance = ");
+//              Serial.println(total_distance);
+//              Serial.print("new_count = ");
+//              Serial.println(new_count);
+              return total_distance / new_count;
+          }
+      }
+      Serial.println("Sonar sensor out of range");
+      return 0;  //return 0 meaning the sensor out of range
+  }
+
+void goToSleep() {
+  // calculate required sleep time and go to sleep
+
+  Serial.print(" Going to sleep now for ");
+  Serial.print(checkFreq);
+  Serial.println(" mins");
+
+  ESP.deepSleep(checkFreq * 60 * 1000000); //deepSleep is microseconds 1 sec = 1000000
+  delay(100);
+
+} // end of void goToSleep()
+
+void measurementEvent() {
+
+
+  //******Measure Water Temperature*********************************************
+  digitalWrite(TempPowerPin, HIGH);  //provide power
+  delay(2000);
+
+  DS18B20.begin();
+  DS18B20.requestTemperatures();
+  temp = DS18B20.getTempCByIndex(0); // Celcius
+  Serial.print("Temperature (C) = ");
+  Serial.println(temp);
+
+  digitalWrite(TempPowerPin, LOW);  //turn off power
+  delay(100);
+
+  //******Battery Voltage Monitoring*********************************************
+  //depend on 220k or 100k resistor used, toggle between this 2 calculation
+
+  // using 220k
+  // Voltage divider R1=100k, R2 = (220k + 100k) + 220k = 540k
+  // Calculation to get the factor: 4.2v * 100/540 = 0.7777, 0.7777 * y = 4.2, y = 5.4
+//  float calib_factor = 5.28; // change this value to calibrate the battery voltage, 5.28 is so call calibrated
+//  float calib_factor = 5.4;
+
+  // using 100k
+  // Voltage divider R1 = 100k, R2 = (220k + 100k) + 100k = 420k;
+  // Calculation to get the factor: 4.2v * 100/420 = 1, 1 * y = 4.2, y = 4.2
+  float calib_factor = 4.2;
+
+  unsigned long raw = analogRead(A0);
+//  Serial.print("raw analog = ");
+//  Serial.println(raw);
+  float volt = raw * calib_factor/1024;
+
+  Serial.print( "\nVoltage = ");
+  Serial.print(volt, 2); // print with 2 decimal places
+  Serial.println (" V");
+
+ //*******************************************************************************
+}


serial to ethernet, web enabled relays.

serial to ethernet, web enabled relays.

error: pathspec 'eth2relay.ino' did not match any file(s) known to git

--- eth2relay.ino
+++ eth2relay.ino
@@ -0,0 +1,463 @@
+//ARDUINO 1.0+ ONLY
+//ARDUINO 1.0+ ONLY
+
+
+#include <Ethernet.h>
+#include <SPI.h>
+boolean reading = false;
+
+////////////////////////////////////////////////////////////////////////
+//CONFIGURE
+////////////////////////////////////////////////////////////////////////
+  //byte ip[] = { 192, 168, 0, 199 };   //Manual setup only
+  //byte gateway[] = { 192, 168, 0, 1 }; //Manual setup only
+  //byte subnet[] = { 255, 255, 255, 0 }; //Manual setup only
+
+  // if need to change the MAC address (Very Rare)
+  byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
+
+  EthernetServer server = EthernetServer(80); //port 80
+////////////////////////////////////////////////////////////////////////
+
+
+
+int SER_Pin = 6;   //pin 14 on the 75HC595
+int RCLK_Pin = 7;  //pin 12 on the 75HC595
+int SRCLK_Pin = 5; //pin 11 on the 75HC595
+
+//How many of the shift registers - change this
+#define number_of_74hc595s 2
+
+//register pins
+#define numOfRegisterPins number_of_74hc595s * 8
+
+boolean registers[numOfRegisterPins];
+
+
+int dev1=0;
+int dev2=1;
+int dev3=2;
+int dev4=3;
+int dev5=4;
+int dev6=5;
+int dev7=6;
+int dev8=7;
+int dev9=8;
+int dev10=9;
+int dev11=10;
+int dev12=11;
+int dev13=12;
+int dev14=13;
+int dev15=14;
+int dev16=15;
+int dev17=16;
+int dev18=17;
+int dev19=18;
+int dev20=19;
+int dev21=20;
+int dev22=21;
+int dev23=22;
+int dev24=23;
+int dev25=24;
+int dev26=25;
+int dev27=26;
+int dev28=27;
+int dev29=28;
+int dev30=29;
+int dev31=30;
+int dev32=31;
+
+////////////////////////////////////////////////////////
+
+
+
+void setup(){
+  Serial.begin(9600);
+
+  //Pins 10,11,12 & 13 are used by the ethernet shield
+ pinMode(SER_Pin, OUTPUT);
+  pinMode(RCLK_Pin, OUTPUT);
+  pinMode(SRCLK_Pin, OUTPUT);
+
+  clearRegisters();
+  writeRegisters();
+
+  Ethernet.begin(mac);
+  //Ethernet.begin(mac, ip, gateway, subnet); //for manual setup
+
+  server.begin();
+  Serial.println(Ethernet.localIP());
+
+}
+
+//set all register pins to LOW
+void clearRegisters(){
+  for(int i = numOfRegisterPins - 1; i >=  0; i--){
+     registers[i] = LOW;
+  }
+  writeRegisters();
+}
+
+
+//Set and display registers
+//Only call AFTER all values are set how you would like (slow otherwise)
+void writeRegisters(){
+
+  digitalWrite(RCLK_Pin, LOW);
+
+  for(int i = numOfRegisterPins - 1; i >=  0; i--){
+    digitalWrite(SRCLK_Pin, LOW);
+
+    int val = registers[i];
+
+    digitalWrite(SER_Pin, val);
+    digitalWrite(SRCLK_Pin, HIGH);
+
+  }
+  digitalWrite(RCLK_Pin, HIGH);
+
+}
+
+//set an individual pin HIGH or LOW
+void setRegisterPin(int index, int value){
+  registers[index] = value;
+}
+
+
+
+
+void loop(){
+
+  // listen for incoming clients, and process qequest.
+  checkForClient();
+
+}
+
+void checkForClient(){
+
+  EthernetClient client = server.available();
+
+  if (client) {
+
+    // an http request ends with a blank line
+    boolean currentLineIsBlank = true;
+    boolean sentHeader = false;
+
+    while (client.connected()) {
+      if (client.available()) {
+
+        if(!sentHeader){
+          // send a standard http response header
+          client.println("HTTP/1.1 200 OK");
+          client.println("Content-Type: text/html");
+          client.println();
+          sentHeader = true;
+        }
+
+        char c = client.read();
+
+        if(reading && c == ' ') reading = false;
+        if(c == '?') reading = true; //found the ?, begin reading the info
+
+        if(reading){
+          Serial.print(c);
+
+           switch (c) {
+
+
+  case 'A':
+             //add code here to trigger on 2
+              triggerPin(dev1, client);
+              break;
+          case 'a':
+            //add code here to trigger on 3
+              triggerOff(dev1, client);
+              break;
+
+  case 'B':
+             //add code here to trigger on 2
+              triggerPin(dev2, client);
+              break;
+          case 'b':
+            //add code here to trigger on 3
+              triggerOff(dev2, client);
+              break;
+
+  case 'C':
+             //add code here to trigger on 2
+              triggerPin(dev3, client);
+              break;
+          case 'c':
+            //add code here to trigger on 3
+              triggerOff(dev3, client);
+              break;
+
+  case 'D':
+             //add code here to trigger on 2
+              triggerPin(dev4, client);
+              break;
+          case 'd':
+            //add code here to trigger on 3
+              triggerOff(dev4, client);
+              break;
+
+  case 'E':
+             //add code here to trigger on 2
+              triggerPin(dev5, client);
+              break;
+          case 'e':
+            //add code here to trigger on 3
+              triggerOff(dev5, client);
+              break;
+
+  case 'F':
+             //add code here to trigger on 2
+              triggerPin(dev6, client);
+              break;
+          case 'f':
+            //add code here to trigger on 3
+              triggerOff(dev6, client);
+              break;
+
+  case 'G':
+             //add code here to trigger on 2
+              triggerPin(dev7, client);
+              break;
+          case 'g':
+            //add code here to trigger on 3
+              triggerOff(dev7, client);
+              break;
+
+  case 'H':
+             //add code here to trigger on 2
+              triggerPin(dev8, client);
+              break;
+          case 'h':
+            //add code here to trigger on 3
+              triggerOff(dev8, client);
+              break;
+
+  case 'I':
+             //add code here to trigger on 2
+              triggerPin(dev9, client);
+              break;
+          case 'i':
+            //add code here to trigger on 3
+              triggerOff(dev9, client);
+              break;
+
+  case 'J':
+             //add code here to trigger on 2
+              triggerPin(dev10, client);
+              break;
+          case 'j':
+            //add code here to trigger on 3
+              triggerOff(dev10, client);
+              break;
+
+  case 'K':
+             //add code here to trigger on 2
+              triggerPin(dev11, client);
+              break;
+          case 'k':
+            //add code here to trigger on 3
+              triggerOff(dev11, client);
+              break;
+
+  case 'L':
+             //add code here to trigger on 2
+              triggerPin(dev12, client);
+              break;
+          case 'l':
+            //add code here to trigger on 3
+              triggerOff(dev12, client);
+              break;
+
+  case 'M':
+             //add code here to trigger on 2
+              triggerPin(dev13, client);
+              break;
+          case 'm':
+            //add code here to trigger on 3
+              triggerOff(dev13, client);
+              break;
+
+  case 'N':
+             //add code here to trigger on 2
+              triggerPin(dev14, client);
+              break;
+          case 'n':
+            //add code here to trigger on 3
+              triggerOff(dev14, client);
+              break;
+
+  case 'O':
+             //add code here to trigger on 2
+              triggerPin(dev15, client);
+              break;
+          case 'o':
+            //add code here to trigger on 3
+              triggerOff(dev15, client);
+              break;
+
+  case 'P':
+             //add code here to trigger on 2
+              triggerPin(dev16, client);
+              break;
+          case 'p':
+            //add code here to trigger on 3
+              triggerOff(dev16, client);
+              break;
+
+  case 'Q':
+             //add code here to trigger on 2
+              triggerPin(dev17, client);
+              break;
+          case 'q':
+            //add code here to trigger on 3
+              triggerOff(dev17, client);
+              break;
+
+  case 'R':
+             //add code here to trigger on 2
+              triggerPin(dev18, client);
+              break;
+          case 'r':
+            //add code here to trigger on 3
+              triggerOff(dev18, client);
+              break;
+
+  case 'S':
+             //add code here to trigger on 2
+              triggerPin(dev19, client);
+              break;
+          case 's':
+            //add code here to trigger on 3
+              triggerOff(dev19, client);
+              break;
+
+  case 'T':
+             //add code here to trigger on 2
+              triggerPin(dev20, client);
+              break;
+          case 't':
+            //add code here to trigger on 3
+              triggerOff(dev20, client);
+              break;
+
+  case 'U':
+             //add code here to trigger on 2
+              triggerPin(dev21, client);
+              break;
+          case 'u':
+            //add code here to trigger on 3
+              triggerOff(dev21, client);
+              break;
+
+  case 'V':
+             //add code here to trigger on 2
+              triggerPin(dev22, client);
+              break;
+          case 'v':
+            //add code here to trigger on 3
+              triggerOff(dev22, client);
+              break;
+
+  case 'W':
+             //add code here to trigger on 2
+              triggerPin(dev23, client);
+              break;
+          case 'w':
+            //add code here to trigger on 3
+              triggerOff(dev23, client);
+              break;
+
+  case 'X':
+             //add code here to trigger on 2
+              triggerPin(dev24, client);
+              break;
+          case 'x':
+            //add code here to trigger on 3
+              triggerOff(dev24, client);
+              break;
+
+  case 'Y':
+             //add code here to trigger on 2
+              triggerPin(dev25, client);
+              break;
+          case 'y':
+            //add code here to trigger on 3
+              triggerOff(dev25, client);
+              break;
+
+  case 'Z':
+             //add code here to trigger on 2
+              triggerPin(dev26, client);
+              break;
+          case 'z':
+            //add code here to trigger on 3
+              triggerOff(dev26, client);
+              break;
+
+
+
+
+
+           }
+
+        }
+
+        if (c == '\n' && currentLineIsBlank)  break;
+
+        if (c == '\n') {
+          currentLineIsBlank = true;
+        }else if (c != '\r') {
+          currentLineIsBlank = false;
+        }
+
+      }
+    }
+
+    delay(1); // give the web browser time to receive the data
+    client.stop(); // close the connection:
+
+  }
+
+}
+
+
+
+
+
+
+
+void triggerOff(int offdev, EthernetClient client){
+  int delayTime=1000;
+
+    client.print("Turning OFF dev ");
+  client.println(offdev);
+  client.print("
");
+   client.print("
MAINC SRULDEBA???");
+
+      setRegisterPin(offdev, LOW);
+      writeRegisters();
+      delay(delayTime);
+;
+
+}
+
+void triggerPin(int ondev, EthernetClient client){
+
+    int delayTime=1000;
+
+  client.print("Turning on dev ");
+  client.println(ondev);
+  client.print("
");
+
+      setRegisterPin(ondev, HIGH);
+      writeRegisters();
+      delay(delayTime);
+;
+
+
+}


Create AppleDock_originalLight.ino

Create AppleDock_originalLight.ino

error: pathspec 'AppleDock_originalLight.ino' did not match any file(s) known to git


The arduino code for #SafetyPin FlashCavalry

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/GalacticSmarties/electra.git/'


added XBee echo test for time measurement

error: pathspec 'test/XBee_echo_test/XBee_echo_test.ino' did not match any file(s) known to git

--- test/XBee_echo_test/XBee_echo_test.ino
+++ test/XBee_echo_test/XBee_echo_test.ino
@@ -0,0 +1,36 @@
+/*
+  XBee_echo_test.ino
+
+  Created 03/26/2014
+  By benzh@eecs.berkeley.edu
+
+*/
+
+#include <SoftwareSerial.h>
+
+SoftwareSerial XBee(3,2); // RX, TX
+
+
+void setup()
+{
+  Serial.begin(9600);
+  XBee.begin(9600);
+
+  Serial.println("ready!");
+}
+
+String serialString;
+void loop()
+{
+   if (XBee.available()) {
+     delay(2);                 //delay to allow buffer to fill
+      while (XBee.available()) {
+        char c = XBee.read();  //gets one byte from serial buffer
+        serialString += c; //makes the string readString
+      }
+
+     XBee.print(serialString);
+     serialString = "";
+   }
+}
+


blink sketch creation

blink sketch creation

error: pathspec 'blink/blink.ino' did not match any file(s) known to git

--- blink/blink.ino
+++ blink/blink.ino
@@ -0,0 +1,17 @@
+/*
+blink
+turn on and off a led on the pin D7 of the LoLin ESP-12E NodeMcu V3
+*/
+
+int led = 13; // D7 = GPIO13
+
+void setup() {
+    pinMode(led, OUTPUT);
+}
+
+void loop() {
+    digitalWrite(led, HIGH);
+    delay(1000);
+    digitalWrite(led, LOW);
+    delay(1000);
+}


HandleDisconnect example (#271)

HandleDisconnect example (#271)

* Add HandleDisconnect example
* Fix #254

error: pathspec 'examples/More/HandleDisconnect/HandleDisconnect.ino' did not match any file(s) known to git

--- examples/More/HandleDisconnect/HandleDisconnect.ino
+++ examples/More/HandleDisconnect/HandleDisconnect.ino
@@ -0,0 +1,71 @@
+/**************************************************************
+ * Blynk is a platform with iOS and Android apps to control
+ * Arduino, Raspberry Pi and the likes over the Internet.
+ * You can easily build graphic interfaces for all your
+ * projects by simply dragging and dropping widgets.
+ *
+ *   Downloads, docs, tutorials: http://www.blynk.cc
+ *   Blynk community:            http://community.blynk.cc
+ *   Social networks:            http://www.fb.com/blynkapp
+ *                               http://twitter.com/blynk_app
+ *
+ * Blynk library is licensed under MIT license
+ * This example code is in public domain.
+ *
+ **************************************************************
+ *
+ * This example shows how to keep WiFi connection on ESP8266.
+ *
+ **************************************************************/
+
+#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
+#include <ESP8266WiFi.h>
+#include <BlynkSimpleEsp8266.h>
+
+// You should get Auth Token in the Blynk App.
+// Go to the Project Settings (nut icon).
+char auth[] = "YourAuthToken";
+
+// Your WiFi credentials.
+// Set password to "" for open networks.
+char ssid[] = "YourNetworkName";
+char pass[] = "YourPassword";
+
+
+int lastConnectionAttempt = millis();
+int connectionDelay = 5000; // try to reconnect every 5 seconds
+
+void setup()
+{
+  Serial.begin(9600);
+  Blynk.begin(auth, ssid, pass);
+}
+
+void loop()
+{
+  // check WiFi connection:
+  if(WiFi.status() != WL_CONNECTED)
+  {
+    // (optional) "offline" part of code
+
+    // check delay:
+    if(millis() - lastConnectionAttempt >= connectionDelay)
+    {
+      lastConnectionAttempt = millis();
+
+      // attempt to connect to Wifi network:
+      if (pass && strlen(pass))
+      {
+        WiFi.begin((char*)ssid, (char*)pass);
+      }
+      else
+      {
+        WiFi.begin((char*)ssid);
+      }
+    }
+  }
+  else
+  {
+    Blynk.run();
+  }
+}


GPS update frequency increased

GPS update frequency increased

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/quinten991/PenO3OnTrack.git/'


ui we forgot to write the interrupt registers

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/trinamic/T-Bone.git/'


adds nonblocking params example

adds nonblocking params example

error: pathspec 'examples/NonBlocking/AutoConnectNonBlockingwParams/AutoConnectNonBlockingwParams.ino' did not match any file(s) known to git

--- examples/NonBlocking/AutoConnectNonBlockingwParams/AutoConnectNonBlockingwParams.ino
+++ examples/NonBlocking/AutoConnectNonBlockingwParams/AutoConnectNonBlockingwParams.ino
@@ -0,0 +1,35 @@
+#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager
+WiFiManager wm;
+WiFiManagerParameter custom_mqtt_server("server", "mqtt server", "", 40);
+
+void setup() {
+    // put your setup code here, to run once:
+    Serial.begin(115200);
+
+    //reset settings - wipe credentials for testing
+    //wm.resetSettings();
+    wm.addParameter(&custom_mqtt_server);
+    wm.setConfigPortalBlocking(false);
+    wm.setSaveParamsCallback(saveParamsCallback);
+
+    //automatically connect using saved credentials if they exist
+    //If connection fails it starts an access point with the specified name
+    if(wm.autoConnect("AutoConnectAP")){
+        Serial.println("connected...yeey :)");
+    }
+    else {
+        Serial.println("Configportal running");
+    }
+}
+
+void loop() {
+    wm.process();
+    // put your main code here, to run repeatedly:
+}
+
+void saveParamsCallback () {
+  Serial.println("Get Params:");
+  Serial.print(custom_mqtt_server.getID());
+  Serial.print(" : ");
+  Serial.println(custom_mqtt_server.getValue());
+}


Add PLSR stochastic drum sequencer function.

error: pathspec 'examples/plsr/plsr.ino' did not match any file(s) known to git


Add empty SensorTag library accomodate demo Sketches

error: pathspec 'hardware/cc2600emt/libraries/SensorTag/LowPowerWatchDemo/LowPowerWatchDemo.ino' did not match any file(s) known to git

--- hardware/cc2600emt/libraries/SensorTag/LowPowerWatchDemo/LowPowerWatchDemo.ino
+++ hardware/cc2600emt/libraries/SensorTag/LowPowerWatchDemo/LowPowerWatchDemo.ino
@@ -0,0 +1,158 @@
+// Include application, user and local libraries
+#include "Wire.h"
+#include "SPI.h"
+#include "OneMsTaskTimer.h"
+#include "LCD_SharpBoosterPack_SPI.h"
+#include "Adafruit_TMP007.h"
+#include <ti/sysbios/knl/Clock.h>
+
+#include <ti/sysbios/hal/Seconds.h>
+#include <time.h>
+
+/* TMP007 driver */
+Adafruit_TMP007 tmp007;
+
+/* LCD driver */
+LCD_SharpBoosterPack_SPI myScreen(7, 20, 10, false);
+
+int32_t secondsOffset = 0;
+
+Semaphore_Handle mySem;
+
+void myClkFunc(UArg arg)
+{
+    Semaphore_post(mySem);
+}
+
+void button1Interrupt()
+{
+    Semaphore_post(mySem);
+}
+
+void button2Interrupt()
+{
+    Semaphore_post(mySem);
+}
+
+void lcdSetup() {
+    Semaphore_Params mySemParams;
+    Clock_Params myClkParams;
+
+    /* Use pull up on button inputs to save power */
+    pinMode(PUSH1, INPUT_PULLUP);
+    pinMode(PUSH2, INPUT_PULLUP);
+
+    /* Both buttons post the semaphore */
+    attachInterrupt(PUSH1, button1Interrupt, FALLING);
+    attachInterrupt(PUSH2, button2Interrupt, FALLING);
+
+    /* set LCD's EXTMODE low (sadly this is the UART Rx pin too) */
+    digitalWrite(12, 0);
+
+    /* turn off MPU power */
+    digitalWrite(22, 0);
+
+    /* put flash into power down mode */
+    SPI.begin();
+    SPI.transfer((uint8_t)32, 0xb9);
+    SPI.end();
+
+    /* power down the tmp007 */
+    Wire.begin();
+    tmp007.begin(TMP007_CFG_1SAMPLE);
+    tmp007.write16(TMP007_CONFIG, TMP007_CFG_ALERTEN | TMP007_CFG_TRANSC | TMP007_CFG_1SAMPLE);
+    Wire.end();
+
+    Semaphore_Params_init(&mySemParams);
+
+    mySem = Semaphore_create(0, &mySemParams, NULL);
+
+    Clock_Params_init(&myClkParams);
+
+    myClkParams.period = 100000; /* one second */
+    myClkParams.startFlag = true;
+
+    /* comment out for steady state power testing */
+    Clock_create(myClkFunc, 0, &myClkParams, NULL);
+
+    myScreen.begin(); /* also calls SPI.begin() */
+
+    myScreen.setFont(1);
+    myScreen.text(10, 10, "Hello!");
+    myScreen.flush();
+
+    SPI.end(); /* to save power */
+
+    /* Say Hello for 1 second */
+    delay(1000);
+
+    SPI.begin();
+    myScreen.clear();
+    SPI.end(); /* to save Power */
+}
+
+void printTime()
+{
+    String buf;
+    uint32_t curSeconds;
+    int days, hours, minutes, seconds;
+
+    SPI.begin();
+
+    myScreen.clearBuffer();
+
+    myScreen.text(5, 10, "Energia");
+
+    curSeconds = Seconds_get();
+    seconds = (int) curSeconds % 60;
+    minutes = (int) ((curSeconds / 60) % 60);
+    hours   = (int) ((curSeconds / (60*60)) % 24);
+    days    = (int) (curSeconds / (60*60*24));
+
+    if (hours < 10) {
+        buf += "0";
+    }
+    buf += hours;
+    buf += ":";
+    if (minutes < 10) {
+        buf += "0";
+    }
+    buf += minutes;
+    buf += ":";
+    if (seconds < 10) {
+        buf += "0";
+    }
+    buf += seconds;
+    myScreen.text(1, 50, buf);
+    myScreen.text(25, 70, "Time");
+    buf = "";
+    if (days < 100) buf += "0";
+    if (days < 10) buf += "0";
+    buf += days;
+    buf += ":";
+    myScreen.text(1, 30, buf);
+    myScreen.flush();
+
+    SPI.end(); /* to save Power */
+}
+
+void lcdLoop() {
+
+    Semaphore_pend(mySem, BIOS_WAIT_FOREVER);
+
+    /* Advance quickly */
+    while(digitalRead(PUSH2) == 0) {
+        secondsOffset += 100;
+        Seconds_set(secondsOffset);
+        printTime();
+    }
+
+    /* reverse more slowly */
+    while(digitalRead(PUSH1) == 0) {
+        secondsOffset -= 10;
+        Seconds_set(secondsOffset);
+        printTime();
+    }
+
+    printTime();
+}


RC Levels test / play project

RC Levels test / play project

error: pathspec 'RC_levels.ino' did not match any file(s) known to git

--- RC_levels.ino
+++ RC_levels.ino
@@ -0,0 +1,268 @@
+/*
+ * RC Reciever LED Level Indicator
+ *
+ * Shows current levels on four main RC channels via 3 LED array (one at a time).
+ * Toggle channel shown via momentary (.25 second) high level on another channel.
+ * Requires EnableInterrupt.
+ *
+ * First Arduino "project", code could probably be better.
+ *
+ * created 27 Oct 2015
+ * by James Watts
+ */
+
+#include <EnableInterrupt.h>
+
+// RC Channels in
+#define THROTTLE_SIGNAL_IN 2
+#define YAW_SIGNAL_IN      5
+#define PITCH_SIGNAL_IN    4
+#define ROLL_SIGNAL_IN     3
+#define TOGGLE_SIGNAL_IN   10
+
+// LED level out
+#define LEVEL_OUT_LOW  A0
+#define LEVEL_OUT_MED  A1
+#define LEVEL_OUT_HIGH A2
+
+// Signal LED
+#define SIGNAL_OUT 13
+
+// Update Flags
+#define THROTTLE_FLAG 1
+#define YAW_FLAG      2
+#define PITCH_FLAG    4
+#define ROLL_FLAG     8
+#define TOGGLE_FLAG   16
+
+volatile uint8_t updateFlagsShared;
+uint8_t currentFlag;
+
+// Shared ISR channel values
+volatile uint16_t throttleInShared;
+volatile uint16_t yawInShared;
+volatile uint16_t pitchInShared;
+volatile uint16_t rollInShared;
+volatile uint16_t toggleInShared;
+
+// Channel pulse times
+uint32_t throttleStart;
+uint32_t yawStart;
+uint32_t pitchStart;
+uint32_t rollStart;
+uint32_t toggleStart;
+
+// Signal LED pulse time / state
+uint32_t signalStart = 0;
+int signalState = LOW;
+
+// Toggle time / state
+uint32_t toggleLastChange = 0;
+int toggleLastState = 0;
+
+void setup() {
+  // Setup input (RC) pins
+  pinMode(THROTTLE_SIGNAL_IN, INPUT);
+  pinMode(YAW_SIGNAL_IN, INPUT);
+  pinMode(PITCH_SIGNAL_IN, INPUT);
+  pinMode(ROLL_SIGNAL_IN, INPUT);
+  pinMode(TOGGLE_SIGNAL_IN, INPUT);
+
+  // Setup output LED pins
+  pinMode(LEVEL_OUT_LOW, OUTPUT);
+  pinMode(LEVEL_OUT_MED, OUTPUT);
+  pinMode(LEVEL_OUT_HIGH, OUTPUT);
+  pinMode(SIGNAL_OUT, OUTPUT);
+
+  // Setup current channel
+  currentFlag = THROTTLE_FLAG;
+
+  // Attach Interrupts
+  enableInterrupt(THROTTLE_SIGNAL_IN, calcThrottle, CHANGE);
+  enableInterrupt(YAW_SIGNAL_IN, calcYaw, CHANGE);
+  enableInterrupt(PITCH_SIGNAL_IN, calcPitch, CHANGE);
+  enableInterrupt(ROLL_SIGNAL_IN, calcRoll, CHANGE);
+  enableInterrupt(TOGGLE_SIGNAL_IN, calcToggle, CHANGE);
+}
+
+void loop() {
+  // Local Channel Values
+  static uint16_t throttleIn;
+  static uint16_t yawIn;
+  static uint16_t pitchIn;
+  static uint16_t rollIn;
+  static uint16_t toggleIn;
+
+  // Local flag copy
+  static uint8_t updateFlags;
+
+  // Check channels for updates and copy to locals
+  if (updateFlagsShared) {
+    noInterrupts();
+    updateFlags = updateFlagsShared;
+
+    if (updateFlags & THROTTLE_FLAG) {
+      throttleIn = throttleInShared;
+    }
+
+    if (updateFlags & YAW_FLAG) {
+      yawIn = yawInShared;
+    }
+
+    if (updateFlags & PITCH_FLAG) {
+      pitchIn = pitchInShared;
+    }
+
+    if (updateFlags & ROLL_FLAG) {
+      rollIn = rollInShared;
+    }
+
+    if (updateFlags & TOGGLE_FLAG) {
+      toggleIn = toggleInShared;
+    }
+
+    updateFlagsShared = 0;
+    interrupts();
+  }
+
+  // Handle toggle state change
+  if (updateFlags & TOGGLE_FLAG) {
+
+    // Check if toggle is held at high level for more than .25 seconds
+    // but only toggle once per switch (debounce)
+    if (toggleIn > 1900) {
+      if (toggleLastState == 0) {
+        if (toggleLastChange == 0) {
+          toggleLastChange = millis();
+        } else if ((millis() - toggleLastChange) > 250) {
+
+          // Toggled high for > .25 seconds, switch channels
+          if (currentFlag & ROLL_FLAG) {
+            currentFlag = THROTTLE_FLAG;
+          } else {
+            currentFlag = currentFlag << 1;
+          }
+
+          // Save the toggled state to prevent another
+          // toggle until switch is released (channel level low)
+          toggleLastState = 1;
+        }
+      }
+    } else {
+      toggleLastChange = 0;
+      toggleLastState = 0;
+    }
+  }
+
+  // Show channel selected by current mask
+  if (currentFlag & THROTTLE_FLAG) {
+    showSignalLevel(throttleIn);
+  } else if (currentFlag & YAW_FLAG) {
+    showSignalLevel(yawIn);
+  } else if (currentFlag & PITCH_FLAG) {
+    showSignalLevel(pitchIn);
+  } else if (currentFlag & ROLL_FLAG) {
+    showSignalLevel(rollIn);
+  } else {
+    // Default to Throttle
+    showSignalLevel(throttleIn);
+  }
+
+  // Show current channel selected by flashing signal LED
+  showCurrentChannel(currentFlag);
+}
+
+// Handle interrupts for each channel, could be rewritten as a single
+// function via EI_ARDUINO_INTERRUPTED_PIN detection
+void calcThrottle() {
+  if (digitalRead(THROTTLE_SIGNAL_IN) == HIGH) {
+    throttleStart = micros();
+  } else {
+    throttleInShared = (uint16_t)(micros() - throttleStart);
+    updateFlagsShared |= THROTTLE_FLAG;
+  }
+}
+
+void calcYaw() {
+  if (digitalRead(YAW_SIGNAL_IN) == HIGH) {
+    yawStart = micros();
+  } else {
+    yawInShared = (uint16_t)(micros() - yawStart);
+    updateFlagsShared |= YAW_FLAG;
+  }
+}
+
+void calcPitch() {
+  if (digitalRead(PITCH_SIGNAL_IN) == HIGH) {
+    pitchStart = micros();
+  } else {
+    pitchInShared = (uint16_t)(micros() - pitchStart);
+    updateFlagsShared |= PITCH_FLAG;
+  }
+}
+
+void calcRoll() {
+  if (digitalRead(ROLL_SIGNAL_IN) == HIGH) {
+    rollStart = micros();
+  } else {
+    rollInShared = (uint16_t)(micros() - rollStart);
+    updateFlagsShared |= ROLL_FLAG;
+  }
+}
+
+void calcToggle() {
+  if (digitalRead(TOGGLE_SIGNAL_IN) == HIGH) {
+    toggleStart = micros();
+  } else {
+    toggleInShared = (uint16_t)(micros() - toggleStart);
+    updateFlagsShared |= TOGGLE_FLAG;
+  }
+}
+
+// Translate current channel's level to lighting the LED array
+void showSignalLevel(uint16_t levelIn) {
+
+  if (levelIn > 1100) {
+    // Show LOW LED
+    digitalWrite(LEVEL_OUT_LOW, HIGH);
+  } else {
+    digitalWrite(LEVEL_OUT_LOW, LOW);
+  }
+
+  if (levelIn > 1400) {
+    // Show MED LED
+    digitalWrite(LEVEL_OUT_MED, HIGH);
+  } else {
+    digitalWrite(LEVEL_OUT_MED, LOW);
+  }
+
+  if (levelIn > 1900) {
+    // Show HIGH LED
+    digitalWrite(LEVEL_OUT_HIGH, HIGH);
+  } else {
+    digitalWrite(LEVEL_OUT_HIGH, LOW);
+  }
+}
+
+// Flash Signal LED, speed based on current channel
+void showCurrentChannel(uint8_t currentChannelFlag) {
+  uint16_t interval;
+  uint16_t currentTime = millis();
+
+  if (currentChannelFlag > 0) {
+    interval = 1000 / currentChannelFlag;
+  } else {
+    interval = 2000;
+  }
+
+  if (currentTime - signalStart >= interval) {
+    signalStart = currentTime;
+    if (signalState == LOW) {
+      digitalWrite(SIGNAL_OUT, HIGH);
+      signalState = HIGH;
+    } else {
+      digitalWrite(SIGNAL_OUT, LOW);
+      signalState = LOW;
+    }
+  }
+}


Further attempt at int-fix in cdMotor-code

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/tihlde/ircbot.git/'


housekeeping

housekeeping

error: pathspec 'robolette.ino' did not match any file(s) known to git

--- robolette.ino
+++ robolette.ino
@@ -0,0 +1,59 @@
+// Copyright (c) 2012 Aaron Roth
+// See the file license.txt for copying permission.
+//
+
+const int baud_rate = 9600;
+const int buffer_size = 2;
+const int right_valve = 8;
+const int left_valve = 11;
+const int pour_time = 1000;
+
+// Buffer and variables to store incoming valve pour states.
+int buffer[buffer_size];
+int right_v_state;
+int left_v_state;
+
+void setup()
+{
+  Serial.begin(baud_rate);
+  pinMode(8, OUTPUT);
+  pinMode(11, OUTPUT);
+}
+
+void loop()
+{
+  if (Serial.available())
+  {
+    memset(buffer, '\0', buffer_size);
+
+    for (int i = 0; i < 2; i++)
+    {
+      buffer[i] = int(Serial.read()) - 48;
+      delay(5);
+    }
+
+    right_v_state = buffer[0];
+    left_v_state = buffer[1];
+
+    if (right_v_state == 1 && left_v_state == 0)
+    {
+      digitalWrite(right_valve, HIGH);
+      delay(pour_time);
+      digitalWrite(right_valve, LOW);
+    }
+    else if (right_v_state == 0 && left_v_state == 1)
+    {
+      digitalWrite(left_valve, HIGH);
+      delay(pour_time);
+      digitalWrite(left_valve, LOW);
+    }
+    else if (right_v_state == 1 && left_v_state == 1)
+    {
+      digitalWrite(right_valve, HIGH);
+      digitalWrite(left_valve, HIGH);
+      delay(pour_time);
+      digitalWrite(right_valve, LOW);
+      digitalWrite(left_valve, LOW);
+    }
+  }
+}


feat: Create examples using timeouts

feat: Create examples using timeouts

Resolves: #44

error: pathspec 'examples/Timeout/Timeout.ino' did not match any file(s) known to git

--- examples/Timeout/Timeout.ino
+++ examples/Timeout/Timeout.ino
@@ -0,0 +1,56 @@
+/*
+ * Timeout
+ * Prints the distance read by an ultrasonic sensor in
+ * centimeters and change the default timeout. They are
+ * supported to four pins ultrasound sensors (liek HC-SC04)
+ * and three pins (like PING))) and Seeed Studio sesores).
+ *
+ * The circuit:
+ * * Module HR-SC04 (four pins) or PING))) (and other with
+ *   three pins), attached to digital pins as follows:
+ * ---------------------    --------------------
+ * | HC-SC04 | Arduino |    | 3 pins | Arduino |
+ * ---------------------    --------------------
+ * |   Vcc   |   5V    |    |   Vcc  |   5V    |
+ * |   Trig  |   12    | OR |   SIG  |   13    |
+ * |   Echo  |   13    |    |   Gnd  |   GND   |
+ * |   Gnd   |   GND   |    --------------------
+ * ---------------------
+ * Note: You do not obligatorily need to use the pins defined above
+ *
+ * By default, the distance returned by the read()
+ * method is in centimeters, to get the distance in inches,
+ * pass INC as a parameter.
+ * Example: ultrasonic.read(INC)
+ *
+ * created 3 Apr 2014
+ * by Erick Simões (github: @ErickSimoes | twitter: @AloErickSimoes)
+ * modified 23 Jan 2017
+ * by Erick Simões (github: @ErickSimoes | twitter: @AloErickSimoes)
+ * modified 03 Mar 2017
+ * by Erick Simões (github: @ErickSimoes | twitter: @AloErickSimoes)
+ * modified 11 Jun 2018
+ * by Erick Simões (github: @ErickSimoes | twitter: @AloErickSimoes)
+ *
+ * This example code is released into the MIT License.
+ */
+
+ #include <Ultrasonic.h>
+
+/**
+ * Is possible set the timeout in the constructor, like:
+ * Ultrasonic ultrasonic(12, 13, 20000UL);
+ */
+Ultrasonic ultrasonic(12, 13);
+
+void setup() {
+  Serial.begin(9600);
+  ultrasonic.setTimeout(40000UL);
+
+}
+
+void loop() {
+  Serial.print("Distance in CM: ");
+  Serial.println(ultrasonic.read());
+  delay(1000);
+}


Entradas analógicas - Sensor de temperatura LM35

error: pathspec 'LM4F_E004/LM4F_E004.ino' did not match any file(s) known to git


add nameSetter

add nameSetter

error: pathspec 'arduino/NameSetter.ino' did not match any file(s) known to git

--- arduino/NameSetter.ino
+++ arduino/NameSetter.ino
@@ -0,0 +1,25 @@
+#include <SoftwareSerial.h>
+#include <PLabBTSerial.h>
+
+#define txPin 3
+#define rxPin 2
+
+char BTName[] = "BACK_FLIP";
+char ATCommand[] = "AT+NAMEMAX_SPEED";
+PLabBTSerial btSerial(txPin, rxPin);
+
+void setup() {
+  Serial.begin(9600);
+  btSerial.begin(9600);
+}
+
+void loop() {
+  Serial.print("Setting new name for device to: MAX_SPEED");
+  Serial.println(BTName);
+
+  btSerial.write(ATCommand);
+  btSerial.write(BTName);
+  btSerial.write(0x0D);
+  btSerial.write(0x0A);
+  delay(5000);
+}


Create sketch_BMP085.ino

Create sketch_BMP085.ino

error: pathspec 'Seeed/BMP085/sketch_BMP085.ino' did not match any file(s) known to git

--- Seeed/BMP085/sketch_BMP085.ino
+++ Seeed/BMP085/sketch_BMP085.ino
@@ -0,0 +1,46 @@
+/* Barometer demo V1.0
+* Based largely on code by  Jim Lindblom
+* Get pressure, altitude, and temperature from the BMP085.
+* Serial.print it out at 9600 baud to serial monitor.
+*
+* By:http://www.seeedstudio.com
+*/
+#include "Barometer.h"
+#include <Wire.h>
+float temperature;
+float pressure;
+float atm;
+float altitude;
+Barometer myBarometer;
+void setup(){
+  Serial.begin(9600);
+  myBarometer.init();
+  Serial.println("SetUp - Ok");
+}
+
+void loop()
+{
+   temperature = myBarometer.bmp085GetTemperature(myBarometer.bmp085ReadUT()); //Get the temperature, bmp085ReadUT MUST be called first
+   pressure = myBarometer.bmp085GetPressure(myBarometer.bmp085ReadUP());//Get the temperature
+   altitude = myBarometer.calcAltitude(pressure); //Uncompensated caculation - in Meters
+   atm = pressure / 101325;
+
+  Serial.print("Temperature: ");
+  Serial.print(temperature, 2); //display 2 decimal places
+  Serial.println("deg C");
+
+  Serial.print("Pressure: ");
+  Serial.print(pressure, 0); //whole number only.
+  Serial.println(" Pa");
+
+  Serial.print("Ralated Atmosphere: ");
+  Serial.println(atm, 4); //display 4 decimal places
+
+  Serial.print("Altitude: ");
+  Serial.print(altitude, 2); //display 2 decimal places
+  Serial.println(" m");
+
+  Serial.println();
+
+  delay(10000); //wait a second and get values again.
+}


add source code

add source code

error: pathspec 'monte_carlo_integration_using_entropy_library/monte_carlo_integration_using_entropy_library.ino' did not match any file(s) known to git

--- monte_carlo_integration_using_entropy_library/monte_carlo_integration_using_entropy_library.ino
+++ monte_carlo_integration_using_entropy_library/monte_carlo_integration_using_entropy_library.ino
@@ -0,0 +1,146 @@
+#include <Entropy.h>
+
+#include <StackList.h>//need a stack to evaluate our expression; easier than writing an infix parser or doing it myself. bog-standard stack implemented using linked list
+
+unsigned long g_last_random; // last random value
+//i dont know why i'm doing this on an arduino, but the due is kinda neat for math stuff like this
+//don't bother trying this on anything but a 32-bit board (e.g. the Due); the loss of precision from floats would be egregious in addition to the considerably slower clock speed et al.
+void setup() {
+  Serial.begin(9600);
+
+  //init_real_random();
+  monte_carlo_integrate("2x*", 0, 10, 200000, 1);
+}
+void loop(){  }
+//expression must be postfix, at current time only supports one digit numbers and one variable [a-zA-z]
+//lower_bound is self explanatory, as is upper_bound
+//counter is a number specifying how many times you want to put a point in the box, basically. It's a long in case you want to do more than max_int calculations (recommended)
+//I found good results with 100,000 to 200,000 iterations; be warned that beyond that it takes a _very_ long time to calculate the result (or at least more time than I was willing to wait)
+//interval is the delta used for finding the approximate max value of the function over the interval; 0.01 is probably a good place to start
+double monte_carlo_integrate(String expression, int lower_bound, int upper_bound, long counter, double interval){
+  Serial.print("Doing Monte Carlo integration of ");
+  Serial.println(expression);
+  Serial.print("Lower bound: ");
+  Serial.println(lower_bound);
+  Serial.print("Upper bound: ");
+  Serial.println(upper_bound);
+  Serial.print("Check count: ");
+  Serial.println(counter);
+  int hits = 0;
+  Serial.print("Finding approx max: ");
+  double approx_max = find_max(expression, interval, lower_bound, upper_bound);
+  Serial.println(approx_max);
+  for (long i = 0; i < counter; i++) {
+    double rand_x;
+    do{
+      //rand_x = random_number() * upper_bound;
+      double to_abs = upper_bound - lower_bound;
+      rand_x = Entropy.rnorm((upper_bound - lower_bound / 2.0), (abs(to_abs)/2.0));
+    }
+    while (rand_x < lower_bound);
+    double rand_y = random_number() * approx_max;
+
+      double result = postfix_eval(expression, rand_x);
+    if (rand_y <= result){
+      hits++;
+    }
+    Serial.print(".");
+  }
+  Serial.print("hits: ");
+  Serial.println(hits);
+  Serial.print("total number of attempts: ");
+  Serial.println(counter);
+  double proportion = (double(hits)/double(counter));
+  Serial.print("Proportion of hits: ");
+  Serial.println(proportion,5);
+  double box_area = ((upper_bound - lower_bound) * approx_max);
+  Serial.print("Area of rectangle: ");
+  Serial.println(box_area, 5);
+  double estimated_result = proportion * box_area;
+  Serial.print("Estimated result: ");
+  Serial.println(estimated_result,5);
+  return estimated_result;
+}
+
+double postfix_eval(String expression, double var){ //use a stack to evaluate a postfix expression. var is what it will put on the stack if it finds a character other than an operator or a digit.
+  double y;
+  double y1;
+  double y2;
+  StackList<double> stack;
+  char ch;
+  for (int i = 0; i < expression.length(); i++){
+    ch = expression.charAt(i);
+    if(ch>='a'&&ch<='z'||ch>='A'&&ch<='Z')
+    {
+      stack.push(var);
+    }
+    else
+      if(ch >= '0' && ch <= '9'){
+        stack.push(ch - 48);
+      }
+      else
+        if(ch == '+' || ch == '-' || ch == '*' || ch == '/' || ch == '^')
+      {
+        y2 = stack.pop();
+        y1 = stack.pop();
+        if(ch == '+')
+        {
+          y = y1 + y2;
+          stack.push(y);
+        }
+        if(ch == '-')
+        {
+          y = y1 - y2;
+          stack.push(y);
+        }
+        if(ch == '^')
+        {
+          y = pow(y1, y2); //^ is the bitwise xor op for some asinine reason, so pow is used. returns a double so no loss of precision.
+          stack.push(y);
+        }
+        if(ch == '*')
+        {
+          y = y1 * y2;
+          stack.push(y);
+        }
+        if(ch=='/')
+        {
+          y = y1 / y2;
+          stack.push(y);
+        }
+      }
+  }
+  double r = stack.pop();
+  return r;
+}
+
+double find_max(String expression, double interval, int lower_bound, int upper_bound){ //find the max value so we have a vertical size for our box
+  double return_this = 0;//initialize our return to 0
+  double current_val = lower_bound;
+  double temp;
+  while (current_val <= upper_bound){
+    temp = postfix_eval(expression, current_val);
+    if(temp >= return_this){
+      return_this = temp;
+    }
+    current_val+=interval;
+  }
+  return return_this;//duh
+}
+
+
+void init_real_random()//initialize our prng
+{
+  g_last_random = millis();//reasonably random seed; not perfect but better than the godawful builtin random algo
+}
+
+double random_number() //random() (the default arduino prng) is a pos, this provides more "random" results and also returns a double between 0 and 1, which is more useful
+{
+  unsigned long temp;
+  temp = 663608941*g_last_random; //multiply a big number by our last random number
+  g_last_random = temp; //new random
+  return(((double)temp)/((double)4294967295)); //make it a small number; this is essentially a prototypical prng but other implementations (i.e. seed based on a0 voltage) didn't pan out
+}
+
+
+


add coca cola sign animation

add coca cola sign animation

error: pathspec 'CocaCola/CocaCola.ino' did not match any file(s) known to git

--- CocaCola/CocaCola.ino
+++ CocaCola/CocaCola.ino
@@ -0,0 +1,106 @@
+typedef enum {
+    HackH = 48,
+    HackA = 26,
+    HackC = 24,
+    HackK = 46,
+    MiddleA = 36,
+    ColaC = 38,
+    ColaO = 28,
+    ColaL = 40,
+    ColaA = 30,
+    RedZero = 44,
+    RedOne = 34,
+    RedTwo = 50,
+    RedThree = 42,
+    RedFour = 22,
+    RedFive = 32
+ } PatternToPin;
+
+static int Lights[16] = {
+    HackH,
+    HackA,
+    HackC,
+    HackK,
+    MiddleA,
+    ColaC,
+    ColaO,
+    ColaL,
+    ColaA,
+    RedZero,
+    RedOne,
+    RedTwo,
+    RedThree,
+    RedFour,
+    RedFive
+};
+
+#define PATTERN_OFF HIGH
+#define PATTERN_ON LOW
+#define PATTERN_INITIALIZE OUTPUT
+
+typedef enum {
+    none = 0,
+    minimal = 375,
+    normal = 800,
+    ish = 2000,
+    extended = 4000
+} interval;
+
+void setup() {
+    for (int i = 0; i < 16; i++) {
+        pinMode(Lights[i], PATTERN_INITIALIZE);
+    }
+}
+
+void loop() {
+    for (int i = 0; i < 16; i++) {
+      digitalWrite(Lights[i], PATTERN_OFF);
+    }
+
+    // turn letters on, one at a time
+    int letters[] = {
+        HackH,
+        HackA,
+        HackC,
+        HackK,
+        MiddleA,
+        ColaC,
+        ColaO,
+        ColaL,
+        ColaA,
+    };
+
+    for (int i = 0; i < 10; i++) {
+        digitalWrite(letters[i], PATTERN_ON);
+        delay(normal);
+    }
+
+    int background[] = {
+        RedZero,
+        RedOne,
+        RedTwo,
+        RedThree,
+        RedFour,
+        RedFive
+    };
+
+    for (int i = 0; i < 6; i++) {
+        digitalWrite(background[i], PATTERN_ON);
+        delay(minimal);
+    }
+
+    delay(extended);
+
+    for (int i = 6 - 1; i >= 0; i--) {
+        digitalWrite(background[i], PATTERN_OFF);
+        delay(minimal);
+    }
+
+        delay(normal);
+
+    for (int i = 0; i < 10; i++) {
+        digitalWrite(letters[i], PATTERN_OFF);
+    }
+
+    delay(ish);
+}


Add Bluetooth 2.0 Serial Port Profile (SPP) example

error: pathspec 'examples/Boards_BLE/Serial_HC05_HC06/Serial_HC05_HC06.ino' did not match any file(s) known to git

--- examples/Boards_BLE/Serial_HC05_HC06/Serial_HC05_HC06.ino
+++ examples/Boards_BLE/Serial_HC05_HC06/Serial_HC05_HC06.ino
@@ -0,0 +1,51 @@
+/**************************************************************
+ * Blynk is a platform with iOS and Android apps to control
+ * Arduino, Raspberry Pi and the likes over the Internet.
+ * You can easily build graphic interfaces for all your
+ * projects by simply dragging and dropping widgets.
+ *
+ *   Downloads, docs, tutorials: http://www.blynk.cc
+ *   Blynk community:            http://community.blynk.cc
+ *   Social networks:            http://www.fb.com/blynkapp
+ *                               http://twitter.com/blynk_app
+ *
+ * Blynk library is licensed under MIT license
+ * This example code is in public domain.
+ *
+ **************************************************************
+ * This example shows how to use Arduino with HC-06/HC-05
+ * Bluetooth 2.0 Serial Port Profile (SPP) module
+ * to connect your project to Blynk.
+ *
+ * Feel free to apply it to any other example. It's simple!
+ *
+ * NOTE: Bluetooth support is in beta!
+ *
+ **************************************************************/
+
+// You could use a spare Hardware Serial on boards that have it (like Mega)
+#include <SoftwareSerial.h>
+SoftwareSerial DebugSerial(2, 3); // RX, TX
+
+#define BLYNK_PRINT DebugSerial
+#include <BlynkSimpleStream.h>
+
+// You should get Auth Token in the Blynk App.
+// Go to the Project Settings (nut icon).
+char auth[] = "YourAuthToken";
+
+void setup()
+{
+  // Debug console
+  DebugSerial.begin(9600);
+
+  // Blynk will work through Serial
+  Serial.begin(9600);
+  Blynk.begin(auth, Serial);
+}
+
+void loop()
+{
+  Blynk.run();
+}
+


attiny_dual_uart.ino: Added arduino code for Serial operation

error: pathspec 'attiny85/attiny85_dual_uart.ino' did not match any file(s) known to git

--- attiny85/attiny85_dual_uart.ino
+++ attiny85/attiny85_dual_uart.ino
@@ -0,0 +1,48 @@
+// Attiny85 Slave code that broadcasts
+// analgoue digitals over Uart when requested
+
+// Define Pins for Software Serial
+
+#include <SoftwareSerial.h>
+
+#define rxPin 0
+#define txPin 2
+
+const uint8_t analogInPin = A3;
+const uint8_t digitalInPin = A2;
+uint8_t       ser_byte = 0;
+uint16_t      readings[2];
+
+SoftwareSerial tinySerial(rxPin, txPin);
+
+void setup()
+{
+   pinMode(digitalInPin, INPUT);
+   tinySerial.begin(9600);
+}
+
+void loop()
+{
+    // Update the readings in memory
+    readings[0] = digitalRead(digitalInPin);
+    readings[1] = analogRead(analogInPin);
+
+    // If there is a serial byte available
+    if (tinySerial.available() > 0) {
+
+      // Read incoming byte:
+      ser_byte = tinySerial.read();
+
+      //Safety delay
+      delay(2);
+
+      // Only two attiny pins are exposed, only look for ascii 0,1
+      if (ser_byte >= 49 && ser_byte <= 50)
+      {
+        // Convert from ASCII to int
+        ser_byte -= 49;
+        // Return the requested position in the buffer
+        tinySerial.println(readings[ser_byte]);
+      }
+    }
+}


Added the firmware for Rev B

Added the firmware for Rev B

error: pathspec 'Rev' did not match any file(s) known to git
error: pathspec 'B/electronic_load.ino' did not match any file(s) known to git


Create hue_and_brightness_example.ino

Create hue_and_brightness_example.ino

error: pathspec 'hue_and_brightness_example.ino' did not match any file(s) known to git

--- hue_and_brightness_example.ino
+++ hue_and_brightness_example.ino
@@ -0,0 +1,69 @@
+//===============================================================
+// hue_and_brightness_example.ino
+//
+// Example setup for using two potentiometers to control hue and
+// brightness with FastLED.
+//
+// Every time the function checkKnobs() is called it will read
+// the current value of both potentiometers and map those values
+// to a hue and master brightness for FastLED.
+//===============================================================
+
+#include "FastLED.h"
+#define LED_TYPE NEOPIXEL
+#define DATA_PIN 6
+#define NUM_LEDS 12
+#define MASTER_BRIGHTNESS 255  // Set the master brigtness value [should be greater then min_brightness value].
+uint8_t min_brightness = 30;   // Set a minimum brightness level.
+uint8_t brightness;            // Mapped master brightness based on potentiometer reading.
+CRGB leds[NUM_LEDS];
+
+int potPinA = A0;   // Pin for potentiometer A (for hue)
+int potPinB = A1;   // Pin for potentiometer B (for brightness)
+int potValA;        // Variable to store potentiometer A value (for hue)
+int potValB;        // Variable to store potentiometer B value (for brightness)
+uint8_t hue;        // Hue color (0-255)
+
+
+//---------------------------------------------------------------
+void setup() {
+  delay(2000);  // Power-up delay
+  //Serial.begin(115200);  // Allows serial monitor output (check baud rate)
+  FastLED.addLeds<LED_TYPE,DATA_PIN>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
+  FastLED.setBrightness(MASTER_BRIGHTNESS);  // Initially set the max brightness.  Will continuously update it later.
+  pinMode(potPinA, INPUT);  // Set pin as an input.
+  pinMode(potPinB, INPUT);  // Set pin as an input.
+}
+
+
+//---------------------------------------------------------------
+void loop() {
+  checkKnobs();  // Call function to check knob positions.
+
+  for (int i = 0; i < NUM_LEDS; i++) {
+    leds[i] = CHSV(hue, 255, 255);  // hue comes from pot A, and brightness value is scaled based on pot B.
+  }
+  FastLED.show();
+}
+
+
+//===============================================================
+void checkKnobs(){
+  potValA = analogRead(potPinA);  // Read potentiometer A (for hue).
+  //potValA = map(potValA, 1023, 0, 0, 1023);  // Reverse reading if potentiometer is wired backwards.
+  hue = map(potValA, 0, 1023, 0, 255);  // map(value, fromLow, fromHigh, toLow, toHigh)
+
+  potValB = analogRead(potPinB);  // Read potentiometer B (for brightness).
+  brightness = map(potValB, 0, 1023, min_brightness, MASTER_BRIGHTNESS);
+      // Map value between min_brightness and MASTER brightness values.
+      // Note: We are limiting the lowest possible brightness value to the
+      // min_brightness value assigned up top.
+  FastLED.setBrightness(brightness);  // Set master brightness based on potentiometer position.
+
+  //Serial.print("  pot A: "); Serial.print(potValA); Serial.print("    hue: "); Serial.print(hue);
+  //Serial.print("    pot B: "); Serial.print(potValB); Serial.print("    brightness: "); Serial.println(brightness);
+}
+
+
+//---------------------------------------------------------------
+


Create spark-Web-Tinker.ino

Create spark-Web-Tinker.ino

error: pathspec 'spark-Web-Tinker.ino' did not match any file(s) known to git

--- spark-Web-Tinker.ino
+++ spark-Web-Tinker.ino
@@ -0,0 +1,328 @@
+//Version 0.1
+// Codeur : Sébastien Joly
+// This #include statement was automatically added by the Spark IDE.
+#include "SparkTime.h"
+// This #include statement was automatically added by the Spark IDE.
+#include "HttpResponse.h"
+// This #include statement was automatically added by the Spark IDE.
+#include "http_parser.h"
+// This #include statement was automatically added by the Spark IDE.
+#include "HttpRequest.h"
+// This #include statement was automatically added by the Spark IDE.
+#include "slre.h"
+
+#include <map>
+#include <list>
+
+char myIpString[24];
+char maMacString[32];
+//char MaintenantString;
+//NTP -----------------------
+//UDP UDPClient;
+//SparkTime rtc;
+//unsigned long currentTime;
+//unsigned long lastTime = 0UL;
+//String timeStr;
+//---------------------------
+
+class Welcome : public HttpResponse {
+protected:
+    Stream& printBody(Stream& aStream) const {
+        aStream.print(
+"<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01//EN' \
+	'http://www.w3.org/TR/html4/strict.dtd'> \
+  \
+     \
+    <meta http-equiv='Content-Type' content='text/html; charset=utf-8' /> \
+    <meta http-equiv='refresh' content='5'> \
+    <title> \
+    Sparkcore \
+    </title> \
+     \
+     \
+
Serveur  SparkCore
 \
+
D0 : On - Off
 \
+
D1 : On - Off
 \
+
D2 : On - Off
 \
+
D3 : On - Off
 \
+
D4 : On - Off
 \
+
D5 : On - Off
 \
+
D6 : On - Off
 \
+
D7 : On - Off
 \
+    \n \
+\n");
+        return aStream;
+    }
+
+public:
+};
+
+const Welcome welcome;
+
+void flashGreen(const unsigned aDelay = 500) {
+    RGB.control(true);
+
+    RGB.color(0, 255, 0);
+    delay(aDelay);
+    RGB.color(0,0,0);
+
+    RGB.control(false);
+}
+
+void flashRed(const unsigned aDelay = 500) {
+    RGB.control(true);
+
+    RGB.color(255, 0, 0);
+    delay(aDelay);
+    RGB.color(0,0,0);
+
+    RGB.control(false);
+}
+
+/**
+ * "Class WebServer" impléments TCPServer et fourni toutes les methodes pour le serveur http .
+ * Pour démarer à besoin de begin().
+ * Peut être arrêté avec end().
+ */
+class WebServer : public TCPServer {
+private:
+
+protected:
+
+public:
+/**
+ * Port d'écoute TCP/80.
+ */
+    WebServer() : TCPServer(80) {}
+    WebServer(const unsigned aPort) : TCPServer(aPort) {}
+/**
+ * Doît-être utilisé dans la fonction boucle loop() .
+ */
+    void loop() {
+        //currentTime = rtc.now(); //-----------------------------------------
+        if (TCPClient client = available()) {
+
+            HttpRequest hr;
+            while (int nb = client.available()) {
+                Serial.println(nb);
+                for (int i = nb; i > 0; --i) {
+                    const char buf = client.read();
+                    Serial.print(buf);
+                    hr.parse(buf);
+                }
+                Serial.println();
+            }
+            Serial.print("URL : "); Serial.println(hr.URL());
+#ifdef USE_HEADERS
+            hr.printHeaders();
+#endif
+            struct slre_cap caps[4];
+//Gestion des URL
+            if (slre_match("^/(|index.htm)$", hr.URL(), strlen(hr.URL()), NULL, 0) >= 0) {
+                client << welcome;
+                Serial.println("Debug : Requete sur index.htm");
+//URL JSON---------------------------------------------------------------------------------------------------
+            } else if ((slre_match("^/json$", hr.URL(), strlen(hr.URL()), caps, 1) >= 0)) {
+                //string json;
+                    //json = "{\"id\":\""  + String(maMacString) + "\",\"analog\":$D,\"name\":\"Temp $D\",\"val\":$T}";
+                    //const char lib[] = "{\"id\":\""  + maMacString + "\",\"analog\":$D,\"name\":\"Temp $D\",\"val\":$T}";
+                    //const char lib[] = json;
+                    //"{\"id\":\"$H\",\"analog\":$D,\"name\":\"Temp $D\",\"val\":$T}";
+                    //HttpResponseStatic resp(lib, strlen(lib));
+                    //HttpResponseStatic resp(lib, strlen(lib));
+                    //client << resp.status(400);
+//web/URL REST D0 -----------------------------------------------------------------------------------------------
+            } else if ((slre_match("^/D0/(on|off)$", hr.URL(), strlen(hr.URL()), caps, 1) >= 0)) {
+                pinMode(D0, OUTPUT);
+                if (!strcmp(caps[0].ptr, "on")) {
+                    digitalWrite(D0, HIGH);
+                    //client << err204.status(204);
+                    client << welcome;
+                    flashGreen();
+                } else if (!strcmp(caps[0].ptr, "off")) {
+                    digitalWrite(D0, LOW);
+                    //client << err204.status(204);
+                    client << welcome;
+                    flashRed();
+                } else {
+                    const char lib[] = "Le paramètre doit-être 'on' ou 'off'.";
+                    HttpResponseStatic resp(lib, strlen(lib));
+                    client << resp.status(400);
+                }
+//URL REST D1 -----------------------------------------------------------------------------------------------
+            } else if ((slre_match("^/D1/(on|off)$", hr.URL(), strlen(hr.URL()), caps, 1) >= 0)) {
+                pinMode(D1, OUTPUT);
+                if (!strcmp(caps[0].ptr, "on")) {
+                    digitalWrite(D1, HIGH);
+                    //client << err204.status(204);
+                    client << welcome;
+                    flashGreen();
+                } else if (!strcmp(caps[0].ptr, "off")) {
+                    digitalWrite(D1, LOW);
+                    //client << err204.status(204);
+                    client << welcome;
+                    flashRed();
+                } else {
+                    const char lib[] = "Le paramètre doit-être 'on' ou 'off'.";
+                    HttpResponseStatic resp(lib, strlen(lib));
+                    client << resp.status(400);
+                }
+//URL REST D2 -----------------------------------------------------------------------------------------------
+            } else if ((slre_match("^/D2/(on|off)$", hr.URL(), strlen(hr.URL()), caps, 1) >= 0)) {
+                pinMode(D2, OUTPUT);
+                if (!strcmp(caps[0].ptr, "on")) {
+                    digitalWrite(D2, HIGH);
+                    //client << err204.status(204);
+                    client << welcome;
+                    flashGreen();
+                } else if (!strcmp(caps[0].ptr, "off")) {
+                    digitalWrite(D2, LOW);
+                    //client << err204.status(204);
+                    client << welcome;
+                    flashRed();
+                } else {
+                    const char lib[] = "Le paramètre doit-être 'on' ou 'off'.";
+                    HttpResponseStatic resp(lib, strlen(lib));
+                    client << resp.status(400);
+                }
+//URL REST D3 -----------------------------------------------------------------------------------------------
+            } else if ((slre_match("^/D3/(on|off)$", hr.URL(), strlen(hr.URL()), caps, 1) >= 0)) {
+                pinMode(D3, OUTPUT);
+                if (!strcmp(caps[0].ptr, "on")) {
+                    digitalWrite(D3, HIGH);
+                    //client << err204.status(204);
+                    client << welcome;
+                    flashGreen();
+                } else if (!strcmp(caps[0].ptr, "off")) {
+                    digitalWrite(D3, LOW);
+                    //client << err204.status(204);
+                    client << welcome;
+                    flashRed();
+                } else {
+                    const char lib[] = "Le paramètre doit-être 'on' ou 'off'.";
+                    HttpResponseStatic resp(lib, strlen(lib));
+                    client << resp.status(400);
+                }
+//URL REST D4 -----------------------------------------------------------------------------------------------
+            } else if ((slre_match("^/D4/(on|off)$", hr.URL(), strlen(hr.URL()), caps, 1) >= 0)) {
+                pinMode(D4, OUTPUT);
+                if (!strcmp(caps[0].ptr, "on")) {
+                    digitalWrite(D4, HIGH);
+                    //client << err204.status(204);
+                    client << welcome;
+                    flashGreen();
+                } else if (!strcmp(caps[0].ptr, "off")) {
+                    digitalWrite(D4, LOW);
+                    //client << err204.status(204);
+                    client << welcome;
+                    flashRed();
+                } else {
+                    const char lib[] = "Le paramètre doit-être 'on' ou 'off'.";
+                    HttpResponseStatic resp(lib, strlen(lib));
+                    client << resp.status(400);
+                }
+//URL REST D5 -----------------------------------------------------------------------------------------------
+            } else if ((slre_match("^/D5/(on|off)$", hr.URL(), strlen(hr.URL()), caps, 1) >= 0)) {
+                pinMode(D5, OUTPUT);
+                if (!strcmp(caps[0].ptr, "on")) {
+                    digitalWrite(D5, HIGH);
+                    //client << err204.status(204);
+                    client << welcome;
+                    flashGreen();
+                } else if (!strcmp(caps[0].ptr, "off")) {
+                    digitalWrite(D5, LOW);
+                    //client << err204.status(204);
+                    client << welcome;
+                    flashRed();
+                } else {
+                    const char lib[] = "Le paramètre doit-être 'on' ou 'off'.";
+                    HttpResponseStatic resp(lib, strlen(lib));
+                    client << resp.status(400);
+                }
+//URL REST D6 -----------------------------------------------------------------------------------------------
+            } else if ((slre_match("^/D6/(on|off)$", hr.URL(), strlen(hr.URL()), caps, 1) >= 0)) {
+                pinMode(D6, OUTPUT);
+                if (!strcmp(caps[0].ptr, "on")) {
+                    digitalWrite(D6, HIGH);
+                    //client << err204.status(204);
+                    client << welcome;
+                    flashGreen();
+                } else if (!strcmp(caps[0].ptr, "off")) {
+                    digitalWrite(D6, LOW);
+                    //client << err204.status(204);
+                    client << welcome;
+                    flashRed();
+                } else {
+                    const char lib[] = "Le paramètre doit-être 'on' ou 'off'.";
+                    HttpResponseStatic resp(lib, strlen(lib));
+                    client << resp.status(400);
+                }
+//URL REST D7 -----------------------------------------------------------------------------------------------
+            } else if ((slre_match("^/D7/(on|off)$", hr.URL(), strlen(hr.URL()), caps, 1) >= 0)) {
+                pinMode(D7, OUTPUT);
+                if (!strcmp(caps[0].ptr, "on")) {
+                    digitalWrite(D7, HIGH);
+                    //client << err204.status(204);
+                    client << welcome;
+                    flashGreen();
+                } else if (!strcmp(caps[0].ptr, "off")) {
+                    digitalWrite(D7, LOW);
+                    //client << err204.status(204);
+                    client << welcome;
+                    flashRed();
+                } else {
+                    const char lib[] = "Le paramètre doit-être 'on' ou 'off'.";
+                    HttpResponseStatic resp(lib, strlen(lib));
+                    client << resp.status(400);
+                }
+//------------------
+            } else {
+                char lib[1024];
+                lib[0] = '\0';
+
+                strcat(lib, "
Not Found
");
+                strcat(lib, "URL: ");
+                strcat(lib, hr.URL());
+                strcat(lib, "");
+
+                HttpResponseStatic resp(lib, strlen(lib));
+                client << resp.status(404);
+            }
+            client.flush();
+            delay(100);
+            client.stop();
+        }
+    };
+};
+
+WebServer ws;
+
+void setup() {
+//Debug console
+    //rtc.begin(&UDPClient, "north-america.pool.ntp.org");
+    //rtc.setTimeZone(+2); // gmt offset
+    Serial.begin(9600);
+    delay(1000);
+    Serial.println(Network.localIP());
+    Serial.println(Network.subnetMask());
+    Serial.println(Network.gatewayIP());
+    Serial.println(Network.SSID());
+//Récupérer IP ----------------------------------------------------------------------------------------------
+    IPAddress myIp = Network.localIP();
+    sprintf(myIpString, "%d.%d.%d.%d", myIp[0], myIp[1], myIp[2], myIp[3]);
+    Spark.variable("ipAddress", myIpString, STRING);
+//Récupérer MAC----------------------------------------------------------------------------------------------
+    byte Mac[6];
+    Network.macAddress(Mac);
+    sprintf(maMacString, "%d:%d:%d:%d:%d:%d", Mac[0], Mac[1], Mac[2], Mac[3], Mac[4], Mac[5]);
+    Spark.variable("AdressePhysique", maMacString, STRING);
+    //remarque : ne remonte pas dans le cloud en raison du bug limitant les variables supérieure à 9 caractères.
+//Démarrer serveur Web---------------------------------------------------------------------------------------
+    ws.begin();
+    flashGreen();
+}
+
+void loop() {
+    ws.loop();
+}
+


split 1-wire bus, part 2

split 1-wire bus, part 2

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/wsnook/farm.git/'


renumber error messages

renumber error messages


Update Templete.ino

Update Templete.ino

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/SirenCreatorTeam/Siren_Zwei.git/'


Interfacing example added

Interfacing example added

error: pathspec 'examples/Interfacing/interfacing.ino' did not match any file(s) known to git

--- examples/Interfacing/interfacing.ino
+++ examples/Interfacing/interfacing.ino
@@ -0,0 +1,154 @@
+/*----------------------------------------------------------
+This example demonstrates how to use the serial interface and
+digital IO while the controller moves a motor in
+the background.
+
+The following serial commands are implemented
+   m: move motor
+   s: start stop sequence
+   e: emergency stop
+   h: help
+
+Additionally a pin can be used to stop the motor
+
+------------------------------------------------------------*/
+
+#include "Arduino.h"
+#include "StepControl.h"
+
+void handleCommands();
+void handlePins();
+
+// stepper and  controller
+constexpr int stpPin = 0, dirPin = 1;
+Stepper motor(stpPin, dirPin);
+StepControl<> controller;
+
+// pin to stop the motor, connect a push button to this pin
+constexpr int stopPin = 2;
+
+// stopwatches
+elapsedMillis displayStopwatch = 0;  // timing the display of the current position
+elapsedMillis blinkStopwatch = 0;    // timing the heartbeat LED
+elapsedMillis debounceTimer = 0;     // debouncing input pins
+
+int lastPos = 0;
+
+
+
+void setup()
+{
+    while (!Serial);
+    Serial.println("Simple Serial Stepper Example");
+
+    motor.setMaxSpeed(5000);
+    motor.setAcceleration(50000);
+
+    pinMode(LED_BUILTIN, OUTPUT);
+    pinMode(stopPin, INPUT_PULLUP);  // touch the pin with GND to stop the motor
+}
+
+
+
+
+void loop()
+{
+    // handle incomming commands on the serial interface ------------------
+    handleCommands();
+
+    // handle input from pins ---------------------------------------------
+    handlePins();
+
+    // display the current motor position every 20ms ----------------------
+    if (displayStopwatch > 20)
+    {
+        displayStopwatch = 0;
+
+        int currentPos = motor.getPosition();
+        if (currentPos != lastPos)  // only display if it changed
+        {
+            lastPos = currentPos;
+            Serial.println(currentPos);
+        }
+    }
+
+    // the usual heartbeat ------------------------------------------------
+    if (blinkStopwatch > 250)
+    {
+        blinkStopwatch = 0;
+        digitalWriteFast(LED_BUILTIN, !digitalReadFast(LED_BUILTIN)); // toggle LED
+    }
+}
+
+
+
+
+//------------------------------------------------
+// Very simple command interface on USB-Serial:
+// m : starts the motor
+// s : starts stop sequence
+// e : emergency stop
+
+void handleCommands()
+{
+    if (Serial.available() > 0)                 // skip if the serial buffer is empty
+    {
+        char cmd = Serial.read();               // get one char from the buffer...
+        switch (cmd)                            // ... and analyze it
+        {
+        case 'm':                               // move command
+            if (!controller.isRunning())        // skip move command if motor is running already
+            {
+                motor.setTargetRel(20000);
+                controller.moveAsync(motor);
+                Serial.println("Started motor movement");
+            }
+            else
+            {
+                Serial.println("Ignored, motor is already running");
+            }
+            break;
+
+        case 's':                               // stop command
+            controller.stopAsync();             // initiate stopping procedure
+            Serial.println("Stopping motor");
+            break;
+
+        case 'e':                               // emergency stop command
+            controller.emergencyStop();
+            Serial.println("Emergency Stop");
+            break;
+
+        case 'h':                               // help / usage command
+        case 'u':
+            Serial.println("\nUsage:");
+            Serial.println("  m: move motor");
+            Serial.println("  s: start stop sequence");
+            Serial.println("  e: emergency stop");
+            Serial.println("  h: display this help");
+            break;
+
+        default:
+            break;
+        }
+    }
+}
+
+
+//------------------------------------------------
+// Connect a pushbutton to the stop pin.
+// Stop command will be issued when pin is
+// pulled to GND.
+// Only very simple debouncing implemented. Use "debounce2.h" or
+// similar for a real application
+
+void handlePins()
+{
+    if (controller.isRunning() && !digitalReadFast(stopPin) && debounceTimer > 200)
+    {
+        debounceTimer = 0;
+        controller.stopAsync();              // initiate stopping procedure
+        Serial.println("Stopping motor");
+    }
+}
+


Started writing IR board code. Going to run it on an arduino pro mini for now.

error: pathspec 'Arduino/IRI2CBoard/IRI2CBoard.ino' did not match any file(s) known to git

--- Arduino/IRI2CBoard/IRI2CBoard.ino
+++ Arduino/IRI2CBoard/IRI2CBoard.ino
@@ -0,0 +1,35 @@
+/*
+ * Driver for a little analog distance sensor to i2c
+ */
+
+#include <Wire.h>
+
+// Command defintions
+byte ENABLE_INTERRUPT=1;
+byte SET_INTERRUPT_DISTANCE=2;
+byte READ_INTERRUPT_DISTANCE=4;
+byte READ_MAX_MIN=8;
+
+void setup(){
+  Wire.begin();        // join i2c bus (address optional for master)
+  Wire.onReceive(receiveEvent); // register event
+  Serial.begin(9600);           // start serial for output
+}
+
+void loop()
+{
+  delay(100);
+}
+
+// function that executes whenever data is received from master
+// this function is registered as an event, see setup()
+void receiveEvent(int howMany)
+{
+  while(1 < Wire.available()) // loop through all but the last
+  {
+    char c = Wire.read(); // receive byte as a character
+    Serial.print(c);         // print the character
+  }
+  int x = Wire.read();    // receive byte as an integer
+  Serial.println(x);         // print the integer
+}


Added seed sketch

Added seed sketch

error: pathspec 'Arduino/seedSketch/seedSketch.ino' did not match any file(s) known to git

--- Arduino/seedSketch/seedSketch.ino
+++ Arduino/seedSketch/seedSketch.ino
@@ -0,0 +1,141 @@
+/*********************************************************************
+This is an example for our Monochrome OLEDs based on SSD1306 drivers
+
+  Pick one up today in the adafruit shop!
+  ------> http://www.adafruit.com/category/63_98
+
+This example is for a 128x64 size display using I2C to communicate
+3 pins are required to interface (2 I2C and one reset)
+
+Adafruit invests time and resources providing this open source code,
+please support Adafruit and open-source hardware by purchasing
+products from Adafruit!
+
+Written by Limor Fried/Ladyada  for Adafruit Industries.
+BSD license, check license.txt for more information
+All text above, and the splash screen must be included in any redistribution
+*********************************************************************/
+
+#include <SPI.h>
+#include <Wire.h>
+#include <Adafruit_GFX.h>
+#include <Adafruit_SSD1306.h>
+  #include <SoftwareSerial.h>
+
+#define OLED_RESET 4
+Adafruit_SSD1306 display(OLED_RESET);
+
+#define NUMFLAKES 10
+#define XPOS 0
+#define YPOS 1
+#define DELTAY 2
+
+
+#define LOGO16_GLCD_HEIGHT 16
+#define LOGO16_GLCD_WIDTH  16
+
+#if (SSD1306_LCDHEIGHT != 64)
+#error("Height incorrect, please fix Adafruit_SSD1306.h!");
+#endif
+
+
+// Blueduino comunicate with BLE module through pin11, pin12 as soft serial.
+SoftwareSerial mySerial(11, 12); //RX,TX
+
+int i = 0;
+String inputString = "";         // a string to hold incoming data
+boolean stringComplete = false;  // whether the string is complete
+
+// pins for the LEDs:
+const int greenPin = 4;
+const int redPin = 5;
+
+void setup()   {
+  // initialize serial:
+  mySerial.begin(9600);
+
+  // by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
+  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3D (for the 128x64)
+  // init done
+
+  // Show image buffer on the display hardware.
+  // Since the buffer is intialized with an Adafruit splashscreen
+  // internally, this will display the splashscreen.
+  display.display();
+  delay(1000);
+
+  // Clear the buffer.
+  display.clearDisplay();
+
+  // reserve 200 bytes for the inputString:
+  inputString.reserve(200);
+
+  // text display tests
+  display.setTextSize(1);
+  display.setTextColor(WHITE);
+  display.setCursor(0,0);
+  display.println("Awaiting input");
+  display.display();
+
+  // initialize serial:
+  mySerial.begin(9600);
+  // make the pins outputs:
+  pinMode(redPin, OUTPUT);
+  pinMode(greenPin, OUTPUT);
+  digitalWrite(redPin, HIGH);
+  digitalWrite(greenPin, HIGH);
+  delay(100);
+  digitalWrite(redPin, LOW);
+  digitalWrite(greenPin, LOW);
+}
+
+void loop() {
+
+ if (stringComplete) {
+    display.clearDisplay();
+    display.setTextSize(1);
+    display.setTextColor(WHITE);
+    display.setCursor(0,0);
+    display.println(inputString);
+    display.display();
+    // clear the string:
+    inputString = "";
+    stringComplete = false;
+  }
+  // if there's any serial available, read it:
+  while (mySerial.available()) {
+    digitalWrite(greenPin, HIGH);
+    char c = mySerial.read();
+    inputString += c;
+    if(c == 0) {
+      digitalWrite(redPin, LOW);
+      display.clearDisplay();
+      display.setTextSize(1);
+      display.setTextColor(WHITE);
+      display.setCursor(0,0);
+      display.println(inputString);
+      display.display();
+      inputString = "";
+    } else {
+      digitalWrite(redPin, HIGH);
+    }
+    if (c == 1) {
+      stringComplete = true;
+    }
+  }
+  digitalWrite(greenPin, LOW);
+}
+
+void testdrawchar(void) {
+  display.setTextSize(1);
+  display.setTextColor(WHITE);
+  display.setCursor(0,0);
+
+  for (uint8_t i=0; i < 168; i++) {
+    if (i == '\n') continue;
+    display.write(i);
+    if ((i > 0) && (i % 21 == 0))
+      display.println();
+  }
+  display.display();
+}


Add an activity/inactivity sketch

Add an activity/inactivity sketch

error: pathspec 'acc_activity_detection/acc_activity_detection.ino' did not match any file(s) known to git

--- acc_activity_detection/acc_activity_detection.ino
+++ acc_activity_detection/acc_activity_detection.ino
@@ -0,0 +1,83 @@
+// Example code for tap detection using accelerometer ADXL345 and RFduino
+// Single and double tap are on the same interrupt pin
+
+#include <Wire.h>
+#include <WInterrupts.h>
+#include <Adafruit_Sensor.h>
+#include <Adafruit_ADXL345_U.h>
+
+#define INTERRUPT_2_ACC_PIN 4 // Pin where the acceleromter interrupt1 is connected
+
+/* Assign a unique ID to this sensor at the same time */
+Adafruit_ADXL345_Unified accel = Adafruit_ADXL345_Unified(12345);
+
+volatile uint8_t actiIntSource = 0; // byte with interrupt informations
+volatile boolean actiIntState = 0; // true when an interrupt occures
+
+void setup(void)
+{
+  // Enable interrupts :
+  interrupts();
+
+  // GPIO 2 handles INT1 of the accelerometer :
+  pinMode(INTERRUPT_2_ACC_PIN, INPUT);
+  attachPinInterrupt(INTERRUPT_2_ACC_PIN, ActivityInterrupt, HIGH);
+
+  Serial.begin(9600);
+  Serial.println("Accelerometer Test");
+
+  /* Initialise the sensor */
+  if(!accel.begin())
+  {
+    /* There was a problem detecting the ADXL345 ... check your connections */
+    Serial.println("Ooops, no ADXL345 detected ... Check your wiring!");
+    while(1);
+  }
+
+  /* Set the range to whatever is appropriate for your project */
+  accel.setRange(ADXL345_RANGE_2_G);
+
+  // enable single and double tap interrupt + activity/inactivity interrupts
+  accel.writeRegister(ADXL345_REG_INT_ENABLE, 0b01111000);
+
+  // map activity/inactivity interrupts on int2
+  accel.writeRegister(ADXL345_REG_INT_MAP, 0b00011000);
+
+  accel.writeRegister(ADXL345_REG_THRESH_ACT, 0b00011111);
+  accel.writeRegister(ADXL345_REG_THRESH_INACT, 0b00011111);
+  accel.writeRegister(ADXL345_REG_TIME_INACT, 0b00000100);
+  accel.writeRegister(ADXL345_REG_ACT_INACT_CTL, 0b11111111);
+
+  //read and clear interrupts
+  accel.readRegister(ADXL345_REG_INT_SOURCE);
+}
+
+/* Tap Interrupt Routine */
+int ActivityInterrupt(uint32_t ulPin)
+{
+  actiIntState = 1;
+  return 0;
+}
+
+void loop(void)
+{
+
+  actiIntSource = accel.readRegister(ADXL345_REG_INT_SOURCE); // read the interrupt source register to reset the interrupt
+  Serial.println(actiIntSource, BIN);
+
+  if (actiIntState)
+  {
+    if(bitRead(actiIntSource, 4)) // The 5th bit is set when double tap, the 6th is set when simple tap
+    {
+      Serial.println("Activity");
+      delay(500); // Need this to avoid the bug of detecting one tap after a double tap (the vibrate function includes it)
+    }
+    else
+    {
+      Serial.println("Inactivity");
+      delay(500);
+    }
+
+    actiIntState = 0; // reset the interrupt boolean
+  }
+}


Add .ino

Add .ino

error: pathspec 'motionsensorcat.ino' did not match any file(s) known to git

--- motionsensorcat.ino
+++ motionsensorcat.ino
@@ -0,0 +1,44 @@
+
+// digital Pin
+int BewegungsPin = 3;
+
+// Variable Declaration
+char BewegungsmelderState = 0;
+
+
+void setup() {
+    // Input
+ pinMode(BewegungsPin, INPUT);
+ Serial.begin(9600);
+
+
+
+}
+
+void loop() {
+
+// Motion Sensor (Send)
+ if (digitalRead(BewegungsPin) == LOW && BewegungsmelderState != 0)
+ {
+
+  BewegungsmelderState = 0;
+
+  Serial.println("LOW");
+ }
+ if (digitalRead(BewegungsPin) == HIGH && BewegungsmelderState != 1)
+ {
+
+  BewegungsmelderState = 1;
+
+  Serial.println("HIGH");
+
+  //iffft
+  bool published = Particle.publish("Let me in!", "1");
+    if (published == false) {
+      Serial.println("dgtf-MCP-button-click failed to publish");
+    }
+ }
+
+
+
+}


initial commit. most things working but EC and pH data passed as string via PubNub

error: pathspec 'master_v2.ino' did not match any file(s) known to git


Asservissement : mise jour commande, correction de l'erreur precedente

error: pathspec 'Module' did not match any file(s) known to git
error: pathspec 'Moteur/Software/Asservissement/Asservissement_vitesse_2.5/Asservissement_vitesse_2.5/Asservissement_vitesse_2.5.ino' did not match any file(s) known to git


Reverted timers to uint32_t variables

Reverted timers to uint32_t variables

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/fbatta/wbox-nodejs.git/'


Kocka leze dirou - Beeper

Kocka leze dirou - Beeper

error: pathspec 'Beeper/Beeper.ino' did not match any file(s) known to git


ok, now starrting the motor

ok, now starrting the motor

and fixing the  sense resistors

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/trinamic/T-Bone.git/'


Added Arduino sketch for stomp pads

Added Arduino sketch for stomp pads

error: pathspec 'StompPadSketch/StompPadSketch.ino' did not match any file(s) known to git

--- StompPadSketch/StompPadSketch.ino
+++ StompPadSketch/StompPadSketch.ino
@@ -0,0 +1,84 @@
+/*
+TrinketKeyboard example
+For Trinket by Adafruit Industries
+*/
+
+#include <TrinketKeyboard.h>
+
+#define PIN_BUTTON_LEFT 0
+#define PIN_BUTTON_RIGHT 2
+
+#define DEBOUNCE 3AA00
+
+void setup()
+{
+  // button pins as inputs
+  pinMode(PIN_BUTTON_LEFT, INPUT);
+  pinMode(PIN_BUTTON_RIGHT, INPUT);
+
+  // setting input pins to high means turning on internal pull-up resistors
+  //digitalWrite(PIN_BUTTON_LEFT, HIGH);
+  //digitalWrite(PIN_BUTTON_RIGHT, HIGH);
+  // remember, the buttons are active-low, they read LOW when they are not pressed
+
+  // start USB stuff
+  TrinketKeyboard.begin();
+}
+
+boolean leftPressed = true;
+boolean lastLeft = false;
+boolean leftDebounceTime = 0;
+
+boolean rightPressed = true;
+boolean lastRight = false;
+boolean rightDebounceTime = 0;
+void loop()
+{
+  // the poll function must be called at least once every 10 ms
+  // or cause a keystroke
+  // if it is not, then the computer may think that the device
+  // has stopped working, and give errors
+  TrinketKeyboard.poll();
+
+  boolean currLeft = (digitalRead(PIN_BUTTON_LEFT) == HIGH);
+  if (currLeft != lastLeft) {
+    leftDebounceTime = millis();
+  }
+
+  if ((millis() - leftDebounceTime) > DEBOUNCE) {
+    if (currLeft != leftPressed) {
+      leftPressed = currLeft;
+
+      if (leftPressed == true) {
+        // this should type a capital A
+        TrinketKeyboard.pressKey(KEYCODE_MOD_LEFT_SHIFT, KEYCODE_A);
+        // this releases the key (otherwise it is held down!)
+        TrinketKeyboard.pressKey(0, 0);
+      }
+    }
+  }
+
+  lastLeft = currLeft;
+
+  // RIGHT BUTTON
+
+  boolean currRight = (digitalRead(PIN_BUTTON_RIGHT) == HIGH);
+  if (currRight != lastRight) {
+    rightDebounceTime = millis();
+  }
+
+  if ((millis() - rightDebounceTime) > DEBOUNCE) {
+    if (currRight != rightPressed) {
+      rightPressed = currRight;
+
+      if (rightPressed == true) {
+        // this should type a capital A
+        TrinketKeyboard.pressKey(KEYCODE_MOD_RIGHT_SHIFT, KEYCODE_D);
+        // this releases the key (otherwise it is held down!)
+        TrinketKeyboard.pressKey(0, 0);
+      }
+    }
+  }
+
+  lastRight = currRight;
+}


shut up

shut up


Arduino code for serial communication without losses .

- Baudrate 115200
- Receives a message and echoes it back
- NO FLUSHes
- No distortion and losses.

error: pathspec 'workspace/serialWithoutDistortion/serialWithoutDistortion.ino' did not match any file(s) known to git

--- workspace/serialWithoutDistortion/serialWithoutDistortion.ino
+++ workspace/serialWithoutDistortion/serialWithoutDistortion.ino
@@ -0,0 +1,26 @@
+String msg;
+void setup() {
+  // put your setup code here, to run once:
+  Serial.begin(115200z);
+  Serial.setTimeout(100);
+}
+
+void loop() {
+  // put your main code here, to run repeatedly:
+  if (Serial.available() > 0)
+  {
+    char ping = Serial.read();
+    if (ping == '2')
+    {
+      Serial.println('0');
+    }else if(ping == '*')
+    {
+      msg = Serial.readStringUntil('$');
+      Serial.println(msg);
+//      Serial.println("Sensors Readings");
+//      Serial.flush();
+    }
+  }
+
+//  delay(100);
+}


added pin to turn on water pump

added pin to turn on water pump

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/robreeves/robotany.git/'


Add Arduino program for working with Analog data

error: pathspec 'Ard-Analog/AnalogIn/AnalogIn.ino' did not match any file(s) known to git

--- Ard-Analog/AnalogIn/AnalogIn.ino
+++ Ard-Analog/AnalogIn/AnalogIn.ino
@@ -0,0 +1,22 @@
+const int analogInPin = A0;
+const int analogOutPin = 3;
+
+int sensorValue = 0;
+int outputValue = 0;
+
+void setup() {
+  Serial.begin(9600);
+}
+
+void loop() {
+  sensorValue = analogRead(analogInPin);
+  outputValue = map(sensorValue, 0, 1023, 0, 255);
+  analogWrite(analogOutPin, outputValue);
+
+  // print the results to the serial monitor:
+  Serial.print("sensor = " );
+  Serial.print(sensorValue);
+  Serial.print("\t output = ");
+  Serial.println(outputValue);
+  delay(250);
+}


Modif code de la pince

Modif code de la pince

error: pathspec 'Module' did not match any file(s) known to git
error: pathspec 'Pince/Moteur_deplacement/Moteur_deplacement.ino' did not match any file(s) known to git


finished testing of data collection

finished testing of data collection

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/janiversen/SolarPower.git/'


Adding current source code to the repository

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/tomwagner1999/SmartHome.git/'


Add fn layer

Add fn layer

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mvines/futboard.git/'


[MCU] Initial MCU Controller

[MCU] Initial MCU Controller

error: pathspec 'MCU/MCU.ino/MCU.ino.ino' did not match any file(s) known to git

--- MCU/MCU.ino/MCU.ino.ino
+++ MCU/MCU.ino/MCU.ino.ino
@@ -0,0 +1,30 @@
+#define ENABLE P2_0
+#define RIGHT_BACK P2_1
+#define RIGHT_AHEAD P2_2
+#define LEFT_BACK P2_3
+#define LEFT_AHEAD P2_4
+
+void setup() {
+  // Open serial communications and wait for port to open:
+  Serial.begin(9600);
+
+  Serial.println("\n\nKC3C-MCU-Sketch");
+  Serial.println("weehowe.z@gmail.com");
+  Serial.println("henryly94@gmail.com");
+
+  pinMode(LEFT_AHEAD,OUTPUT);
+  pinMode(LEFT_BACK,OUTPUT);
+  pinMode(RIGHT_AHEAD,OUTPUT);
+  pinMode(RIGHT_BACK,OUTPUT);
+  pinMode(ENABLE,OUTPUT);
+
+  digitalWrite(ENABLE,HIGH);
+  digitalWrite(LEFT_AHEAD,HIGH);
+  digitalWrite(LEFT_BACK,LOW);
+  digitalWrite(RIGHT_AHEAD,HIGH);
+  digitalWrite(RIGHT_BACK,LOW);
+}
+
+void loop() {
+  while(true);
+}


Delete SunRiseLamp.ino

Delete SunRiseLamp.ino

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/JeanPierreFig/SunRiseLamp.git/'