Create mtt.ino

Create mtt.ino

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

--- mtt.ino
+++ mtt.ino
@@ -0,0 +1,184 @@
+
+
+void setup()
+{
+
+}
+
+
+
+
+
+
+#include <ESP8266WiFi.h>
+#include <SoftwareSerial.h>
+
+#define rxPin 2   // pin for receiving transmissions, input
+#define txPin 3   // pin for sending transmissions, output
+
+//#define rtsPin 4  // pin for switching modes between send and receive, output
+
+SoftwareSerial RS485(rxPin, txPin);
+
+#define pviAddr 2  // address of the inverter (2 is the default)
+#define timeout 1000  // timeout while receiving data in ms
+
+boolean recOk; // stores info of receiving success or fail
+float GridPower;  // current power feeding to grid
+
+/* CRC calculation
+//                                      16   12   5
+// This is the CCITT CRC 16 polynomial X  + X  + X  + 1.
+// This works out to be 0x1021, but the way the algorithm works
+// lets us use 0x8408 (the reverse of the bit pattern). The high
+// bit is always assumed to be set, thus we only use 16 bits to
+// represent the 17 bit value.
+*/
+
+#define POLY 0x8408
+
+unsigned int crc16(byte *data_p, byte length)
+{
+  byte i;
+  unsigned int data;
+  unsigned int crc = 0xffff;
+
+  if (length == 0)
+    return (~crc);
+  do
+  {
+    for (i=0, data=(unsigned int)0xff & *data_p++;
+      i < 8;
+      i++, data >>= 1)
+    {
+      if ((crc & 0x0001) ^ (data & 0x0001))
+        crc = (crc >> 1) ^ POLY;
+      else  crc >>= 1;
+    }
+  } while (--length);
+  crc = ~crc;
+  return (crc);
+}
+
+byte receiveAnswer() {
+  byte recBuff[8];  // receiving buffer, 8 bytes
+  unsigned int  recCRC;
+  byte i;
+  unsigned long startMillis, currentMillis;
+
+  startMillis = millis();
+  currentMillis = startMillis;
+  i = 0;
+
+  while (RS485.available() > 0 and (i <= sizeof(recBuff)) and (currentMillis - startMillis < timeout)) {
+    recBuff[i] = RS485.read();
+    currentMillis = millis();
+    i++;
+  }
+
+  if ((currentMillis - startMillis < timeout) and (recBuff[0] == 0)) {  // no timeout and transmission state is ok
+    recCRC = recBuff[6] + (recBuff[7] << 8);
+    if (recCRC == crc16(recBuff, 6))  // CRC value is ok
+      recOk = true;
+    else
+      Serial.println("CRC Error");
+  }
+  else if (recBuff[0] != 0)
+    Serial.println("Error Code ");
+  else
+    Serial.println("Timeout while receiving data");
+
+ /* Serial.println("Values for Debugging: ");
+  for (i = 0; i < 8; i++) {
+    Serial.print(i);
+    Serial.print(". Wert: ");
+    Serial.print(recBuff[i]);
+    Serial.print(" ");
+  } */
+
+  return(recBuff);
+}
+
+bool sendQuery(byte addr, byte cmd1, byte cmd2, byte cmd3) {
+  byte cmdBuff[] = { addr, cmd1, cmd2, cmd3, 0, 0, 0, 0, 0, 0 }; // command buffer, 10 bytes
+  unsigned int checksum;
+
+  checksum = crc16(cmdBuff, 8);
+  cmdBuff[8] = lowByte(checksum);
+  cmdBuff[9] = highByte(checksum);
+
+  digitalWrite(rtsPin, HIGH); // activate transmission mode
+  if (RS485.write(cmdBuff, 10) == 10) {
+    digitalWrite(rtsPin, LOW);  // switch back to receiving mode
+    return(true);
+  }
+  else {
+    Serial.println("Error while sending data");
+    digitalWrite(rtsPin, LOW);  // switch back to receiving mode
+    return(false);
+  }
+}
+
+float toFloat(byte byteValues[]) {
+  byte switchOrder[4];
+  float *floatValue;
+
+  switchOrder[0] = byteValues[5];
+  switchOrder[1] = byteValues[4];
+  switchOrder[2] = byteValues[3];
+  switchOrder[3] = byteValues[2];
+
+  floatValue = (float *)switchOrder;
+
+  return(*floatValue);
+}
+
+bool getGridPower(float *GridPower) {
+  byte tmpBuff[8];
+  byte i;
+  recOk = false;
+
+  if (sendQuery(pviAddr, 59, 3, 0))
+    tmpBuff[8] = receiveAnswer();
+    *GridPower = toFloat(tmpBuff);
+  if (recOk == true)
+    return true;
+  else
+    return false;
+}
+
+void setup() {
+//-----------
+  Serial.begin(115200);
+  Serial.println();
+  WiFi.begin("MTT_2.4", "x");
+  Serial.print("Connecting");
+  while (WiFi.status() != WL_CONNECTED)
+  {
+    delay(500);
+    Serial.print(".");
+  }
+  Serial.println();
+  Serial.print("Connected, IP address: ");
+  Serial.println(WiFi.localIP());
+// -------------
+
+//Serial.begin(9600);  // initialize serial console
+  RS485.begin(19200);  // initialize serial connection to the inverter
+  pinMode(rxPin, INPUT);  // set pin modes
+  pinMode(txPin, OUTPUT);
+  pinMode(rtsPin, OUTPUT);
+}
+
+void loop() {
+  if (getGridPower(&GridPower)) {
+    Serial.println("Current power being produced is: ");
+    Serial.print(GridPower);
+    Serial.print(" Watts");
+    Serial.println();
+    Serial.println();
+  }
+  else
+    Serial.println("Error, please look above for details.");
+  delay(1000);
+}


2 lines lcd game

2 lines lcd game

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

--- Game.ino
+++ Game.ino
@@ -0,0 +1,407 @@
+
+#include "Wire.h"
+#include "Adafruit_LiquidCrystal.h"
+
+// Connect via i2c, default address #0 (A0-A2 not jumpered)
+Adafruit_LiquidCrystal lcd(0);
+
+char block = 219; // first level obstacles' symbol by ASCII code (rectangle empty inside, some Chinese symbol)
+const char gamer = '*'; // gamer's symbol
+
+int blockCounter = 0; // counts how cells to skip after obstacle has been created
+int counter = 0; // how many cycles gamer survived
+const int baseDelay = 100;
+int _delay; // game's speed, the lesser the faster
+
+char line0[25]; // print buffer for lcd, line 0
+char line1[25]; // print buffer for lcd, line 1
+
+int gamerPos = 0; // what the gamer is located (line 0 or 1)
+int gamerLastPos = 0; // where the gamer was located before he moved (line 0 or 1)
+
+// set pin numbers:
+const int button1Pin = 15;   // the number of the pushbutton pin
+const int button2Pin = 13;   // the number of the pushbutton pin
+const int led1Pin =  2;      // the number of LED pin for button 1
+const int led2Pin = 0;       // the unmber of LED pin for button 2
+
+int button1State = 0;         // variable for reading the pushbutton status
+int button2State = 0;         // variable for reading the pushbutton status
+int button1LastState = 0;     // variable for reading the pushbutton status
+int button2LastState = 0;     // variable for reading the pushbutton status
+
+String matrix1Str = String(16); // string for matrix effect intro
+String matrix2Str = String(16); // string for matrix effect intro
+char matrix1[17];               // char array for matrix effect intro
+char matrix2[17];               // char array for matrix effect intro
+
+// creates obstacles on lines
+// draws checkpoints every 50 symbols
+void GenBlocks(int current, char line0[], char line1[]) {
+
+  // checkpoint
+  if (counter > 0 && (counter % 50 == 0)) {
+    line0[current] = '|';
+    line1[current] = '|';
+  }
+
+  if (blockCounter > 0){
+    blockCounter--;
+    return;
+  }
+
+  // Lets try to create block on line 0
+  if (line0[current]!=block){
+    int factor = random(1000);
+    if (factor > 500) { // success
+      line0[current]=block;
+    }
+  }
+
+  // if there was a block created on line 0 we should then create also on line 1
+  if (line0[current] == block) {
+    if (random(1000) < 500) {
+      line1[current + 2] = block;
+      blockCounter = 3;
+    }
+
+  }
+}
+
+// New game init procedure
+void NewGame() {
+
+  counter = 0;
+  _delay = baseDelay;
+  block = 219;
+
+  strcpy(line0,"                    ");
+  strcpy(line1,"                    ");
+
+  // generate some blocks for start
+  for (int i = 7; i < 16; i++) {
+     GenBlocks(i, line0, line1);
+  }
+
+  gamerPos = 0;
+  gamerLastPos = 0;
+  line0[4]=gamer;
+
+  lcd.clear();
+  lcd.print("Hello gamer :)");
+  lcd.setCursor(0,1);
+  lcd.print("Get ready!");
+
+  delay(1000);
+
+  Serial.println("Print game field");
+  Serial.println(line0);
+  Serial.println(line1);
+
+  lcd.setCursor(0,0);
+  lcd.print(line0);
+  lcd.setCursor(0,1);
+  lcd.print(line1);
+
+  Serial.println("Start game cycle");
+}
+
+void FillStringWithChars(char str[], int strLength) {
+  for (int i = 0; i< strLength; i++) {
+    str[i] = random(34,255);
+  }
+}
+
+// procedure shows "Matrix" effect when symbols fall down in random manner
+void ShowMatrix(){
+
+  // init of char arrays with 16 space symbols (lcd is 16 symbols in a row)
+  strcpy(matrix1,"                    ");
+  strcpy(matrix2,"                    ");
+  matrix1[17]='\0';
+  matrix2[17]='\0';
+
+  // fill first string with random symbols from ASCII
+  FillStringWithChars(matrix1, 16);
+
+  Serial.println("matrix1");
+  Serial.println(matrix1);
+
+  // main cycle
+  for (int j = 0; j < 8; j++) {
+
+    // fill second string with random symbols
+    FillStringWithChars(matrix2, 16);
+
+    Serial.println("matrix2");
+    Serial.println(matrix2);
+
+    matrix1Str = String(matrix1);
+    matrix2Str = String(matrix2);
+
+    // override second string with some symbols from first string
+    for (int i = 0; i< 6; i++) {
+      int element = random(16);
+      matrix2Str[element]=matrix1Str[element];
+    }
+
+  //convert for printing
+  matrix1Str.toCharArray(matrix1,17);
+  matrix2Str.toCharArray(matrix2,17);
+  Serial.println("matrix1");
+  Serial.println(matrix1);
+  Serial.println("matrix2");
+  Serial.println(matrix2);
+
+  // print
+  lcd.setCursor(0,1);
+  lcd.print(matrix1);
+  lcd.setCursor(0,0);
+  lcd.print(matrix2);
+  delay(500);
+
+  FillStringWithChars(matrix1, 16);
+
+  Serial.println("matrix1");
+  Serial.println(matrix1);
+
+  for (int i = 0; i< 6; i++) {
+    int element = random(16);
+    matrix1Str[element]=matrix2Str[element];
+  }
+
+   //convert for printing
+  matrix1Str.toCharArray(matrix1,17);
+  matrix2Str.toCharArray(matrix2,17);
+
+  lcd.setCursor(0,1);
+  lcd.print(matrix2);
+  lcd.setCursor(0,0);
+  lcd.print(matrix1);
+  delay(500);
+  }
+
+  lcd.setCursor(0,0);
+  lcd.print("---+ Runner +---");
+  delay(3000);
+}
+
+// one time start-up procedure
+void setup(void){
+
+  // init serial port and lcd
+  Serial.begin(115200);
+  lcd.begin(16, 2);
+
+  // initialize the LED pin as an output:
+  pinMode(led1Pin, OUTPUT);
+  pinMode(led2Pin, OUTPUT);
+  // initialize the pushbutton pin as an input:
+  pinMode(button1Pin, INPUT);
+  pinMode(button2Pin, INPUT);
+
+  // read the state of the pushbutton value:
+  button1LastState = digitalRead(button1Pin);
+  button2LastState = digitalRead(button2Pin);
+
+  // show intro
+  ShowMatrix();
+
+  // start new game
+  NewGame();
+
+}
+
+void RefreshPic(char line0[], char line1[]){
+  // we do not want to copy gamer's symbol from 4th column
+  for (int i = 0; i < 18; i++) {
+    if (i == 3) {
+      if (gamerLastPos == 0) {
+        line0[i] = '_';
+        line1[i] = line1[i+1];
+      }
+      else {
+        line0[i] = line0[i+1];
+        line1[i] = '_';
+      }
+    }
+    else
+    { // transfer each symbol for 1 cell left creating movement
+      line0[i] = line0[i+1];
+      line1[i] = line1[i+1];
+    }
+  }
+
+}
+
+void ReadButtons(int *positn) {
+ // read the state of the pushbutton value:
+  button1State = digitalRead(button1Pin);
+  button2State = digitalRead(button2Pin);
+
+  // check if the pushbutton is pressed.
+  // if it is, the buttonState is HIGH:
+  if (button1State == HIGH) {
+    // turn LED on:
+    digitalWrite(led1Pin, LOW);
+    if (button1State != button1LastState) {
+      *positn = 0;
+      button1LastState = button1State;
+    }
+
+  } else {
+    button1LastState = 0;
+    // turn LED off:
+    digitalWrite(led1Pin, HIGH);
+  }
+
+  if (button2State == HIGH) {
+    // turn LED on:
+    digitalWrite(led2Pin, LOW);
+    if (button2State != button2LastState) {
+      *positn = 1;
+      button2LastState = button2State;
+    }
+
+  } else {
+    button2LastState = 0;
+    // turn LED off:
+    digitalWrite(led2Pin, HIGH);
+  }
+}
+
+void PrintScore(){
+  lcd.setCursor(0,1);
+  lcd.print("U did:");
+  lcd.print(counter);
+  lcd.print(" cycles");
+}
+
+// procedure for game over
+void GameOver(){
+  lcd.clear();
+  lcd.setCursor(0,0);
+  lcd.print("Game over TT");
+  PrintScore();
+
+  delay(5000);
+
+  // restart the game
+  NewGame();
+}
+
+void GameFinish() {
+  lcd.clear();
+  lcd.setCursor(0,0);
+  lcd.print("-+-+- You won!");
+  lcd.setCursor(0,1);
+  PrintScore();
+  delay(4000);
+
+  lcd.clear();
+  lcd.setCursor(0,0);
+  lcd.print("Next player...  ");
+  lcd.setCursor(0,1);
+  lcd.print("  >>> EXIT >>> ");
+  delay(3000);
+
+  ShowMatrix();
+  NewGame();
+}
+
+// change obstacles' view and increase speed
+void UpdateGameLevel(int *_counter){
+  int level = *_counter / 50;
+
+  Serial.print("current counter ");
+  Serial.println(*_counter);
+  Serial.print("current level ");
+  Serial.println(level);
+
+  if (level == 1) {
+    block = '#';
+    return;
+  }
+
+  if (level == 2) {
+    block = ':';
+    _delay = baseDelay - level*5;
+    return;
+  }
+
+  if (level == 3) {
+    block = '.';
+    _delay = baseDelay - level*5;
+    return;
+  }
+
+  if (level == 4) {
+    block = '_';
+    _delay = baseDelay - level*5;
+    return;
+  }
+
+  if (level == 5) {
+    block = 255;
+    _delay = baseDelay - level*5;
+    return;
+  }
+
+  if (level == 6) {
+    GameFinish();
+  }
+}
+
+//main loop
+void loop(void){
+
+  ReadButtons(&gamerPos);
+  Serial.print("Gamer sits on line ");
+  Serial.println(gamerPos);
+
+  RefreshPic(line0, line1);
+  gamerLastPos = gamerPos;
+
+  // check whether the gamer is in the same cell where the obstacle is
+  if (gamerPos == 0) {
+    if (line0[4] == block) {
+      GameOver();
+    }
+  }
+  else {
+    if (line1[4] == block) {
+      GameOver();
+    }
+  }
+
+  // print gamer's symbol
+  if (gamerPos == 0) {
+    line0[4] = gamer;
+    }
+  else {
+    line1[4] = gamer;
+  }
+
+  // show current game field to user
+  lcd.setCursor(0,0);
+  lcd.print(line0);
+  lcd.setCursor(0,1);
+  lcd.print(line1);
+  Serial.println(line0);
+  Serial.println(line1);
+
+  // generate new obstacles
+  GenBlocks(15, line0, line1);
+
+  counter++;
+
+  UpdateGameLevel(&counter);
+
+  // wait for user's input 5ms*_delay
+  for (int i = 0; i < _delay; i++)
+  {
+    delay(5);
+    ReadButtons(&gamerPos);
+  }
+
+}


Removed misc code for FRAM-RW-validate.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/enablersg/fram-lib.git/'


Changed Trim Limits

Changed Trim Limits

Extended trim range to max possible for software.

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/lowjunen/THOR.git/'


added 5 degree change

added 5 degree change

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/sassystacks/DASS.git/'


Moved arduino files to correct folder system for edit.

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

--- detect/detect.ino
+++ detect/detect.ino
@@ -0,0 +1,23 @@
+#include <NewPing.h>
+
+// Author: Kris Monsen, 2015
+// Credit (where credit is due) & lookups:  johnag (Ultrasonic example @instructables, http://bit.ly/1jBrk0R), Tim Eckel (NewPing-library, http://bit.ly/1pYs3OV)
+
+#define echoPin 3
+#define trigPin 4
+#define maxDistance 200
+
+NewPing ultrasonic(trigPin, echoPin, maxDistance);
+
+void setup() {
+  Serial.begin(9600);
+}
+
+void loop() {
+  delay(50);                     // Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings.
+  Serial.print("Ping: ");
+  Serial.print(ultrasonic.ping_cm()); // Send ping, get distance in cm and print result (0 = outside set distance range)
+  Serial.println("cm");
+
+  delay(500);
+}


Update GPS

Update GPS

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/lolisa/2014-15.git/'


Add more debug

Add more debug

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/Bobox214/Dovlo.git/'


better deadzone

better deadzone

specific to each motor

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


mano v0.4 - InMoov Hand - AILR

mano v0.4 - InMoov Hand - AILR

This version allows control position of each finger with a Potentiometer with Arduino Boards. Similar to mano v0.3
2016.
Angel Iván Lozano Ramírez.
https://goo.gl/rQB4H5

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

--- mano_v0.4/mano_v0.4.ino
+++ mano_v0.4/mano_v0.4.ino
@@ -0,0 +1,53 @@
+///////////////////////////////////////////
+//     Angel Iván Lozano Ramírez         //
+//        Projecto Mano robótica         //
+//            Firmware v0.4              //
+//              21/04/2016               //
+//   Control proporcional de una mano    //
+//  robótica con  potenciómetro de 10K   //
+//        https://goo.gl/XCEf7p          //
+//        https://goo.gl/rQB4H5          //
+///////////////////////////////////////////
+
+#include<Servo.h>
+Servo menique;
+Servo anular;
+Servo medio;
+Servo indice;
+Servo pulgar;
+
+int pot = A0;
+int valor = 0;
+int val = 0;
+int val2 = 0;
+int val3 = 0;
+int val4 = 0;
+int val5 = 0;
+
+void setup() {
+  menique.attach(11);
+  anular.attach(10);
+  medio.attach(9);
+  indice.attach(6);
+  pulgar.attach(5);
+  pinMode(pot, INPUT);
+  Serial.begin(9600);
+}
+
+void loop() {
+  valor = analogRead(pot);
+  Serial.println(valor);
+
+  val = map(valor, 0, 1023, 180, 60);      //Anular
+  val2 = map(valor, 0, 1023, 0, 120);     //Medio
+  val3 = map(valor, 0, 1023, 180, 64);    //Meñique
+  val4 = map(valor, 0, 1023, 180, 92);    //Indice
+  val5 = map(valor, 0, 1023, 0, 128);     //Pulgar
+
+  menique.write(val3);
+  anular.write(val);
+  medio.write(val2);
+  indice.write(val4);
+  pulgar.write(val5);
+}
+


it seems to be alive …

it seems to be alive …

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/'


add quellcode zombie-run

add quellcode zombie-run

error: pathspec 'scoutlab-2017/zombie-run/code/zombie-run.ino' did not match any file(s) known to git

--- scoutlab-2017/zombie-run/code/zombie-run.ino
+++ scoutlab-2017/zombie-run/code/zombie-run.ino
@@ -0,0 +1,93 @@
+/***********************************************************************
+Project ZombieRun
+Erstellt zum ScoutLab 2017
+Von: Julian( VCP Seattle),Kathrin (Hochschule München), Elisabeth
+(Hochschule München)
+Michael (Hochschule München), Döner (VCP Heinrich Zille)
+Datum: 2017-10-22
+*/
+//Hier werden die Zurodung der Tasten festgelegt
+const int gruen = 10;
+//Grüne LED
+const int rot = 11;
+//Rote LED
+const int TasterPin = A2;
+//Taster zum Abschlagen Oder Kontakt
+//( hier mit Kupferstreifen und Schwamm gebastelt)
+const int Lichtsensor = A3;
+//Lichtsensor für das Erlösen des Zombie
+//Konfiguration
+const long interval = 200;
+const long Lichtelevel = 400;
+// Mensch wird
+// Variabel fuer den Spielablauf
+int lebensstatus = 0;
+int ledState = LOW;
+unsigned long previousMillis = 0;
+//Intervall)
+int sensorValue = 0;
+//Legt das Blinkintervall fest
+//Ab welchem Lichtwert der Zombie zum
+//Mensch oder Zombie
+//Fuer den Blinkablauf (Status der LED)
+//Fuer den Blinkablauf (Für den
+//Liest den Wert des Lichtsensors ein
+//Routine fuer die Vorbereitung
+void setup() {
+//Legt die Eingaenge fest
+pinMode(gruen, OUTPUT);
+pinMode(rot, OUTPUT);
+pinMode(TasterPin, INPUT_PULLUP);
+// Startet die Serielle Ausgabe an den Rechner fuer die Fehlersuche
+Serial.begin(9600);
+}
+//Haupt Routine die sich staendig wiederholt
+void loop() {
+// Einlesen des Lichtsensors und Ausgabe des Wertes an den Rechner
+sensorValue = analogRead(Lichtsensor);
+Serial.print("sensor = ");
+Serial.println(sensorValue);
+//Abfrage des aktuellen Zeitpunktes der Laufzeit des Programmes
+unsigned long currentMillis = millis();
+//Dieser Abschnitt fragt ab ob diese Person geheilt wird, also angeleuchtet
+//wird.
+// also vom Zombie zum Menschif (sensorValue > Lichtelevel )
+lebensstatus = 0;
+//Hier wird der Mensch zum Zombie wenn der Taster oder Kontakt betaetigt
+//wurde
+if (digitalRead(TasterPin) == LOW) {
+if (lebensstatus == 0)
+{
+lebensstatus = 1;
+}
+}
+//BlinkRoutine für den Menschen
+if ( lebensstatus == 0) {
+digitalWrite(rot, HIGH);
+//Zombie LED wird ausgeschalten
+//Routine fuer das Blinken
+if (currentMillis - previousMillis >= interval) {
+previousMillis = currentMillis;
+if (ledState == LOW) {
+ledState = HIGH;
+} else {
+ledState = LOW;
+}
+digitalWrite(gruen, ledState);
+}
+}
+//BlinkRoutine für den Zobmbie
+if ( lebensstatus == 1) {
+digitalWrite(gruen, HIGH); //Mensch LED wird ausgeschalten
+//Routine fuer das Blinken
+if (currentMillis - previousMillis >= interval) {
+previousMillis = currentMillis;
+if (ledState == LOW) {
+ledState = HIGH;
+} else {
+ledState = LOW;
+}
+digitalWrite(rot, ledState);
+}
+}
+}


Create Email.ino

Create Email.ino

error: pathspec 'Version' did not match any file(s) known to git
error: pathspec '1.2/With_bell/Email.ino' did not match any file(s) known to git


Delete src.ino

Delete src.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/AJama50/CS207-Project.git/'


Mejora en codigo arduino del controlador -identar-

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

--- Controlador_interfaz_Matlab-Arduino/Controlador/Controlador/Controlador.ino
+++ Controlador_interfaz_Matlab-Arduino/Controlador/Controlador/Controlador.ino
@@ -0,0 +1,122 @@
+//CONTADOR DE PULSOS DE UN VNTILADOR DE COMPUTADORA SIN ESCOBILLAS
+
+const int hardwareCounterPin = 5;   // Entrada del pin para el Timer(Contador)
+int Valor = 0;
+int RPS =0;            //Variable para almacenar el valor de las RPM
+const int samplePeriod = 1000;   // muestra de tiempo (1s)
+unsigned int count;              //Variable del contador
+int PW_MA = 6;
+int Duty=0;
+int Dato=0;
+int v_inicio = 150;
+int error = 0;
+int incremento = 0;
+int n=0;
+
+void setup()
+{
+  Serial.begin(9600);
+  pinMode(PW_MA, OUTPUT);
+  TCCR1A=0;        // reset timer/counter control register A
+}
+
+void loop()
+{
+    n=1;
+    incremento=16;
+    analogWrite(PW_MA,v_inicio);
+
+    Dato = Serial.parseInt();
+    delay(1000);
+    contador();
+    Serial.println(RPS);
+
+    if(Dato==0)
+      {
+        error=0;
+      }
+    else
+      {
+        error = RPS - Dato;
+      }
+      //  Duty = map(Dato,0,34,0,255);
+      //  analogWrite(PW_MA,Duty);
+
+     if (error < 0)
+       {
+         v_inicio=Aumenta_PWM(v_inicio);
+       }
+     if (error > 0)
+       {
+         v_inicio=Disminuye_PWM(v_inicio);
+       }
+        // Serial.println(count);
+        // Serial.println(RPS);    //Se despliega el valor obtenido
+}
+
+void contador(void)
+{
+  for (int i=0; i <= 1; i++)
+    {
+      //  TCNT1 = 0;
+      // Comienza el conteo
+      bitSet(TCCR1B ,CS12);  // Counter Clock source is external pin
+      bitSet(TCCR1B ,CS11);  // Clock on rising edge
+      delay(samplePeriod);   //Tiempo que cuenta
+      // Para de contar
+       //delay(samplePeriod);   //Este retardo es para notar el cambio
+      TCCR1B = 0;
+      count = TCNT1;
+      TCNT1 = 0;  // reset the hardware counter
+    }
+
+    RPS = count / 12;     // Se calculan las RPS--Revoluciones por segundo
+
+}
+
+int Aumenta_PWM(int)
+{
+  do
+    {
+     if (abs(error)==1 && n < 3)
+       {
+         incremento=incremento/2;
+         n=n+1;
+       }
+
+     v_inicio = v_inicio + incremento;
+     analogWrite(PW_MA,v_inicio);
+     delay(1000);
+
+     contador();
+     Dato = Serial.parseInt();
+     error = RPS - Dato;
+     Serial.println(RPS);
+  }while(error < 0);
+
+      return v_inicio;
+}
+
+int Disminuye_PWM(int)
+{
+  do
+    {
+     if (abs(error)==1 && n < 3)
+     {
+         incremento=incremento/2;
+         n=n+1;
+      }
+
+     v_inicio = v_inicio - incremento;
+     analogWrite(PW_MA,v_inicio);
+     delay(1000);
+
+     contador();
+     Dato = Serial.parseInt();
+     error = RPS - Dato;
+     Serial.println(RPS);
+   }while(error > 0);
+
+      return v_inicio;
+}
+


Added ESP32 mysensors mqtt gateway

Added ESP32 mysensors mqtt gateway

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/werar/iothome.git/'


added basic button to trigger timer

added basic button to trigger timer

error: pathspec 'matrix' did not match any file(s) known to git
error: pathspec 'timer/my_-_matrix8x8.ino' did not match any file(s) known to git


urm37 testing

urm37 testing

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


Testing New Function

Testing New Function

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

--- Timer1Shot/Timer1Shot/Timer1Shot.ino
+++ Timer1Shot/Timer1Shot/Timer1Shot.ino
@@ -0,0 +1,165 @@
+// More info about this program is here...
+// http://wp.josh.com/2015/03/05/the-perfect-pulse-some-tricks-for-generating-precise-one-shots-on-avr8/
+
+// Demo of a technique to generate narrow and precise one shot pulses using a
+// timer module on an AVR. This demo code is writen for an Arduino and uses
+// the Timer2 moudle, but this techniquie should would on other AVRs and timers.
+
+// The demo generates one pulse per second.
+// The 1st pulse is 0 cycles long (no pulse),
+// The 2nd pulse is 1 cycle long (~63ns),
+// The 3rd pulse is 2 cycles long (~126ns),
+// ...up to a total of 20 pulses, and then starts over.
+
+// The one shot pulses are output on Digial pin 3
+
+/***************************/
+/* PIN CONNECTIONS & NAMES */
+/***************************/
+#define SERVO_PIN 9
+
+/*************/
+/* CONSTANTS */
+/*************/
+#define MIN 740
+#define MAX 2430
+#define BUFLEN 100
+#define MAXF 5
+#define MAXA 45
+#define OFFSET -40
+
+
+#define OSP_SET_WIDTH(cycles) (OCR1B = 0xffff-(cycles-1))
+
+int pos;
+int maxt = MAX + OFFSET;
+int mint = MIN + OFFSET;
+double mid = 191.62;
+double amp = 23.30;
+long start;
+
+// Setup the one-shot pulse generator and initialize with a pulse width that is (cycles) clock counts long
+
+void osp_setup(uint16_t cycles) {
+
+
+  TCCR1B =  0;      // Halt counter by setting clock select bits to 0 (No clock source).
+              // This keeps anyhting from happeneing while we get set up
+
+  TCNT1 = 0x0000;     // Start counting at bottom.
+  OCR1A = 0;      // Set TOP to 0. This effectively keeps us from counting because the counter just keeps reseting back to 0.
+          // We break out of this by manually setting the TCNT higher than 0, in which case it will count all the way up to MAX and then overflow back to 0 and get locked up again.
+  OSP_SET_WIDTH(cycles);    // This also makes new OCR values get loaded frm the buffer on every clock cycle.
+
+  TCCR1A = _BV(COM2B0) | _BV(COM2B1) | _BV(WGM20) | _BV(WGM21); // OC2B=Set on Match, clear on BOTTOM. Mode 7 Fast PWM.
+  TCCR1B = _BV(WGM22) | _BV(CS20);         // Start counting now. WGM22=1 to select Fast PWM mode 7
+
+  DDRD |= _BV(3);     // Set pin to output (Note that OC2B = GPIO port PD3 = Arduino Digital Pin 3)
+}
+
+void timer1_setup (byte mode, int prescale, byte outmode_A, byte outmode_B, byte capture_mode)
+{
+  // enforce field widths for sanity
+  mode &= 15 ;
+  outmode_A &= 3 ;
+  outmode_B &= 3 ;
+  capture_mode &= 3 ;
+
+  byte clock_mode = 0 ; // 0 means no clocking - the counter is frozen.
+  switch (prescale)
+  {
+    case 1: clock_mode = 1 ; break ;
+    case 8: clock_mode = 2 ; break ;
+    case 64: clock_mode = 3 ; break ;
+    case 256: clock_mode = 4 ; break ;
+    case 1024: clock_mode = 5 ; break ;
+    default:
+      if (prescale < 0)
+        clock_mode = 7 ; // external clock
+  }
+  TCCR1A = (outmode_A << 6) | (outmode_B << 4) | (mode & 3) ;
+  TCCR1B = (capture_mode << 6) | ((mode & 0xC) << 1) | clock_mode ;
+}
+
+// Setup the one-shot pulse generator
+
+void osp_setup() {
+
+  timer1_setup(0x0, 1, 0x0, 0x0, 0x0);
+
+}
+
+// Fire a one-shot pulse. Use the most recently set width.
+
+#define OSP_FIRE() (TCNT1 = OCR1B - 1)
+
+// Test there is currently a pulse still in progress
+
+#define OSP_INPROGRESS() (TCNT1>0)
+
+// Fire a one-shot pusle with the specififed width.
+// Order of operations in calculating m must avoid overflow of the unint8_t.
+// TCNT1 starts one count lower than the match value becuase the chip will block any compare on the cycle after setting a TCNT.
+
+#define OSP_SET_AND_FIRE(cycles) {uint16_t m=0xffff-(cycles-1); OCR1B=m;TCNT1 =m-1;}
+
+
+void setup()
+{
+  Serial.begin(38400);
+  osp_setup();
+  //OSP_SET_WIDTH(254);
+  start = micros();
+}
+
+void loop()
+{
+  long time = micros();
+  //pos = round(amp*sin(2*PI*0.5*(time-start)/1000000.0) + mid);
+  noInterrupts();
+  OSP_SET_AND_FIRE(250);
+  while (OSP_INPROGRESS()){};
+  interrupts();
+  long time2 = micros();
+  Serial.println(time2-time);
+  _delay_ms(20);
+
+  // Step though 0-19 cycle long pulses for demo purposes
+  /*long start = micros();
+  //for(int i=0; i < 150; i++)
+  //{
+    OSP_FIRE(); //160 = 10us
+    while (OSP_INPROGRESS()){};
+  //}
+  long now = micros();
+  Serial.println(now-start);
+  _delay_ms(20);*/
+
+  /*
+  for (pos = 168; pos < 192; pos++) {
+
+    //long beginning = micros();
+    OSP_SET_AND_FIRE(pos);
+
+    //while (OSP_INPROGRESS());         // This just shows how you would wait if nessisary - not nessisary in this application.
+
+    //long now = micros();
+    //Serial.println(now-beginning);
+    delay(20);//_delay_ms(20);      // Wait a sec to let the audience clap
+
+  }
+
+  for (pos = 192; pos > 168; pos--) {
+    //long beginning = micros();
+    OSP_SET_AND_FIRE(pos);
+
+    //while (OSP_INPROGRESS());         // This just shows how you would wait if nessisary - not nessisary in this application.
+
+    //long now = micros();
+    //Serial.println(now-beginning);
+
+    delay(20);//_delay_ms(20);      // Wait a sec to let the audience clap
+
+  }*/
+
+}


Base code for AzElSensor

Base code for AzElSensor

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

--- AzElSensor/AzElSensor.ino
+++ AzElSensor/AzElSensor.ino
@@ -0,0 +1,211 @@
+/*
+ * Base code for AzElSensor taken from:
+ *
+ * https://github.com/chrisspen/homebot/blob/master/src/test/MPU9250-test1/src/mpu9250_arduino.ino
+ *
+ * Attribution is not provided, but is apparently based on the
+ * Arduino Mega code (apparently) by Phillipe Lucidarme at:
+ *
+ * http://www.lucidarme.me/?p=5057
+ *
+*/
+
+#include <Wire.h>
+#include <TimerOne.h>
+
+#define    MPU9250_ADDRESS            0x68
+#define    MAG_ADDRESS                0x0C
+
+#define    GYRO_FULL_SCALE_250_DPS    0x00
+#define    GYRO_FULL_SCALE_500_DPS    0x08
+#define    GYRO_FULL_SCALE_1000_DPS   0x10
+#define    GYRO_FULL_SCALE_2000_DPS   0x18
+
+#define    ACC_FULL_SCALE_2_G        0x00
+#define    ACC_FULL_SCALE_4_G        0x08
+#define    ACC_FULL_SCALE_8_G        0x10
+#define    ACC_FULL_SCALE_16_G       0x18
+
+
+
+// This function read Nbytes bytes from I2C device at address Address.
+// Put read bytes starting at register Register in the Data array.
+void I2Cread(uint8_t Address, uint8_t Register, uint8_t Nbytes, uint8_t* Data)
+{
+  // Set register address
+  Wire.beginTransmission(Address);
+  Wire.write(Register);
+  Wire.endTransmission();
+
+  // Read Nbytes
+  Wire.requestFrom(Address, Nbytes);
+  uint8_t index=0;
+  while (Wire.available())
+    Data[index++]=Wire.read();
+}
+
+
+// Write a byte (Data) in device (Address) at register (Register)
+void I2CwriteByte(uint8_t Address, uint8_t Register, uint8_t Data)
+{
+  // Set register address
+  Wire.beginTransmission(Address);
+  Wire.write(Register);
+  Wire.write(Data);
+  Wire.endTransmission();
+}
+
+
+
+// Initial time
+long int ti;
+volatile bool intFlag=false;
+
+// Initializations
+void setup()
+{
+  // Arduino initializations
+  Wire.begin();
+  Serial.begin(115200);
+
+  // Set accelerometers low pass filter at 5Hz
+  I2CwriteByte(MPU9250_ADDRESS,29,0x06);
+  // Set gyroscope low pass filter at 5Hz
+  I2CwriteByte(MPU9250_ADDRESS,26,0x06);
+
+
+  // Configure gyroscope range
+  I2CwriteByte(MPU9250_ADDRESS,27,GYRO_FULL_SCALE_1000_DPS);
+  // Configure accelerometers range
+  I2CwriteByte(MPU9250_ADDRESS,28,ACC_FULL_SCALE_4_G);
+  // Set by pass mode for the magnetometers
+  I2CwriteByte(MPU9250_ADDRESS,0x37,0x02);
+
+  // Request continuous magnetometer measurements in 16 bits
+  I2CwriteByte(MAG_ADDRESS,0x0A,0x16);
+
+  pinMode(13, OUTPUT);
+  Timer1.initialize(10000);         // initialize timer1, and set a 1/2 second period
+  Timer1.attachInterrupt(callback);  // attaches callback() as a timer overflow interrupt
+
+
+  // Store initial time
+  ti=millis();
+}
+
+
+
+
+
+// Counter
+long int cpt=0;
+
+void callback()
+{
+  intFlag=true;
+  digitalWrite(13, digitalRead(13) ^ 1);
+}
+
+// Main loop, read and display data
+void loop()
+{
+  while (!intFlag);
+  intFlag=false;
+
+  // Display time
+  //Serial.print (millis()-ti,DEC);
+  Serial.print (String("time: ")+String(millis()-ti));
+  Serial.print ("\t");
+
+
+  // _______________
+  // ::: Counter :::
+
+  // Display data counter
+//  Serial.print (cpt++,DEC);
+//  Serial.print ("\t");
+
+
+
+  // ____________________________________
+  // :::  accelerometer and gyroscope :::
+
+  // Read accelerometer and gyroscope
+  uint8_t Buf[14];
+  I2Cread(MPU9250_ADDRESS,0x3B,14,Buf);
+
+  // Create 16 bits values from 8 bits data
+
+  // Accelerometer
+  int16_t ax=-(Buf[0]<<8 | Buf[1]);
+  int16_t ay=-(Buf[2]<<8 | Buf[3]);
+  int16_t az=Buf[4]<<8 | Buf[5];
+
+  // Gyroscope
+  int16_t gx=-(Buf[8]<<8 | Buf[9]);
+  int16_t gy=-(Buf[10]<<8 | Buf[11]);
+  int16_t gz=Buf[12]<<8 | Buf[13];
+
+    // Display values
+
+  // Accelerometer
+  Serial.print("Accel: ");
+  Serial.print (ax,DEC);
+  Serial.print ("\t");
+  Serial.print (ay,DEC);
+  Serial.print ("\t");
+  Serial.print (az,DEC);
+  Serial.print ("\t");
+
+  // Gyroscope
+  Serial.print("Gyro: ");
+  Serial.print (gx,DEC);
+  Serial.print ("\t");
+  Serial.print (gy,DEC);
+  Serial.print ("\t");
+  Serial.print (gz,DEC);
+  Serial.print ("\t");
+
+
+  // _____________________
+  // :::  Magnetometer :::
+
+
+  // Read register Status 1 and wait for the DRDY: Data Ready
+
+  uint8_t ST1;
+  do
+  {
+    I2Cread(MAG_ADDRESS,0x02,1,&ST1);
+  }
+  while (!(ST1&0x01));
+
+  // Read magnetometer data
+  uint8_t Mag[7];
+  I2Cread(MAG_ADDRESS,0x03,7,Mag);
+
+
+  // Create 16 bits values from 8 bits data
+
+  // Magnetometer
+  int16_t mx=-(Mag[3]<<8 | Mag[2]);
+  int16_t my=-(Mag[1]<<8 | Mag[0]);
+  int16_t mz=-(Mag[5]<<8 | Mag[4]);
+
+
+  // Magnetometer
+  Serial.print("Compass: ");
+  Serial.print (mx+200,DEC);
+  Serial.print ("\t");
+  Serial.print (my-70,DEC);
+  Serial.print ("\t");
+  Serial.print (mz-700,DEC);
+  Serial.print ("\t");
+
+
+
+  // End of line
+  Serial.println("");
+  Serial.flush();
+
+}


Added string reference class test

Added string reference class test

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

--- tests/TestStringRefs/TestStringRefs.ino
+++ tests/TestStringRefs/TestStringRefs.ino
@@ -0,0 +1,151 @@
+#include <Arduino.h>
+#include <ArduinoUnit.h>
+#include <Arduino_FreeRTOS.h>
+#include <StandardCplusplus.h>
+#include <RabirdToolkit.h>
+#include <RAbstractStringRef.h>
+#include <string.h>
+
+class BasicStringRef: public RAbstractStringRef
+{
+public:
+  BasicStringRef(const char * str);
+  ~BasicStringRef();
+
+  unsigned int
+  length(void) const
+  {
+    return static_cast<unsigned int>(mLength);
+  }
+
+  char
+  charAt(unsigned int index) const
+  {
+    if((NULL == mStr) || (index >= length()))
+    {
+      return '\0';
+    }
+
+    return mStr[index];
+  }
+
+private:
+  const char * mStr;
+  rnumber_t    mLength;
+};
+
+BasicStringRef::BasicStringRef(const char * str): RAbstractStringRef(), mStr(str), mLength(0)
+{
+  if(NULL != str)
+  {
+    mLength = rSignedCast(strlen(str));
+  }
+}
+
+BasicStringRef::~BasicStringRef()
+{
+}
+
+test(TestAbstractStringRef)
+{
+  const char * normalString0 = "";
+  const char * normalString1 = "a";
+  const char * normalString2 = "ab";
+  const char * normalString3 = "abc";
+  const char * normalString4 = "AbC";
+
+  // length
+  assertEqual(BasicStringRef(normalString0).length(), strlen(normalString0));
+  assertEqual(BasicStringRef(normalString1).length(), strlen(normalString1));
+  assertEqual(BasicStringRef(normalString2).length(), strlen(normalString2));
+  assertEqual(BasicStringRef(normalString3).length(), strlen(normalString3));
+
+  // compareTo
+  assertEqual(BasicStringRef(normalString3).compareTo(BasicStringRef(normalString3)), 0);
+  assertMore(BasicStringRef(normalString3).compareTo(BasicStringRef(normalString2)), 0);
+  assertMore(BasicStringRef(normalString3).compareTo(BasicStringRef(normalString1)), 0);
+  assertMore(BasicStringRef(normalString3).compareTo(BasicStringRef(normalString0)), 0);
+
+  assertLess(BasicStringRef(normalString0).compareTo(BasicStringRef(normalString3)), 0);
+  assertLess(BasicStringRef(normalString0).compareTo(BasicStringRef(normalString2)), 0);
+  assertLess(BasicStringRef(normalString0).compareTo(BasicStringRef(normalString1)), 0);
+  assertLess(BasicStringRef(normalString0).compareTo(BasicStringRef(normalString0)), 0);
+
+  assertEqual(BasicStringRef(normalString3).compareTo((normalString3)), 0);
+  assertMore(BasicStringRef(normalString3).compareTo((normalString2)), 0);
+  assertMore(BasicStringRef(normalString3).compareTo((normalString1)), 0);
+  assertMore(BasicStringRef(normalString3).compareTo((normalString0)), 0);
+
+  assertLess(BasicStringRef(normalString0).compareTo((normalString3)), 0);
+  assertLess(BasicStringRef(normalString0).compareTo((normalString2)), 0);
+  assertLess(BasicStringRef(normalString0).compareTo((normalString1)), 0);
+  assertLess(BasicStringRef(normalString0).compareTo((normalString0)), 0);
+
+  // equals
+  assertTrue(BasicStringRef(normalString3).equals(BasicStringRef(normalString3)));
+  assertTrue(BasicStringRef(normalString3).equals((normalString3)));
+
+  // equalsIgnoreCase
+  assertTrue(BasicStringRef(normalString3).equalsIgnoreCase(BasicStringRef(normalString4)));
+  assertTrue(BasicStringRef(normalString3).equalsIgnoreCase(BasicStringRef(normalString3)));
+  assertFalse(BasicStringRef(normalString3).equalsIgnoreCase(BasicStringRef(normalString2)));
+  assertFalse(BasicStringRef(normalString3).equalsIgnoreCase(BasicStringRef(normalString0)));
+
+  // startsWith
+  assertTrue(BasicStringRef(normalString3).startsWith(BasicStringRef(normalString3)));
+  assertTrue(BasicStringRef(normalString3).startsWith(BasicStringRef(normalString2)));
+  assertTrue(BasicStringRef(normalString3).startsWith(BasicStringRef(normalString1)));
+  assertFalse(BasicStringRef(normalString3).startsWith(BasicStringRef(normalString0)));
+
+  // endsWith
+  assertTrue(BasicStringRef(normalString3).endsWith(BasicStringRef("c")));
+  assertTrue(BasicStringRef(normalString3).endsWith(BasicStringRef("bc")));
+  assertTrue(BasicStringRef(normalString3).endsWith(BasicStringRef("abc")));
+  assertFalse(BasicStringRef(normalString3).endsWith(BasicStringRef("")));
+
+  // charAt
+  assertTrue(BasicStringRef(normalString3).charAt(0) == 'a');
+  assertTrue(BasicStringRef(normalString3).charAt(1) == 'b');
+  assertTrue(BasicStringRef(normalString3).charAt(2) == 'c');
+  assertTrue(BasicStringRef(normalString3).charAt(3) == '\0');
+
+  // operator ==
+  assertTrue(BasicStringRef(normalString3) == BasicStringRef(normalString3));
+  assertTrue(BasicStringRef(normalString3) == normalString3);
+
+  // operator !=
+  assertTrue(BasicStringRef(normalString3) != BasicStringRef(normalString3));
+  assertTrue(BasicStringRef(normalString3) != BasicStringRef(normalString0));
+
+  // operator >
+  assertTrue(BasicStringRef(normalString3) > BasicStringRef(normalString2));
+  assertTrue(BasicStringRef(normalString3) > BasicStringRef(normalString0));
+
+  // operator <
+  assertTrue(BasicStringRef(normalString1) < BasicStringRef(normalString3));
+  assertTrue(BasicStringRef(normalString1) < BasicStringRef(normalString2));
+
+  // operator <=
+  assertTrue(BasicStringRef(normalString2) <= BasicStringRef(normalString3));
+  assertTrue(BasicStringRef(normalString2) <= BasicStringRef(normalString2));
+  assertTrue(BasicStringRef(normalString2) <= BasicStringRef(normalString1));
+  assertFalse(BasicStringRef(normalString2) <= BasicStringRef(normalString0));
+
+  // operator >=
+  assertFalse(BasicStringRef(normalString2) >= BasicStringRef(normalString3));
+  assertTrue(BasicStringRef(normalString2) >= BasicStringRef(normalString2));
+  assertTrue(BasicStringRef(normalString2) >= BasicStringRef(normalString1));
+  assertTrue(BasicStringRef(normalString2) >= BasicStringRef(normalString0));
+}
+
+void setup()
+{
+  Serial.begin(9600);
+  while(!Serial); // for the Arduino Leonardo/Micro only
+}
+
+void loop()
+{
+  Test::run();
+}
+


Vijay - 2017/06/10 - adding arduino java serialport examples

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

--- SerialPortCommunicator/arduinosketch/ControlLEDFromWeb/ControlLEDFromWeb.ino
+++ SerialPortCommunicator/arduinosketch/ControlLEDFromWeb/ControlLEDFromWeb.ino
@@ -0,0 +1,44 @@
+#define LED_RED           2
+#define LED_GREEN         3
+#define LED_YELLOW        4
+
+unsigned char LR=0;
+unsigned char LG=0;
+unsigned char LY=0;
+
+void setup() {
+  // put your setup code here, to run once:
+  Serial.begin(9600);
+  pinMode(LED_RED,   OUTPUT);
+  pinMode(LED_GREEN, OUTPUT);
+  pinMode(LED_YELLOW,  OUTPUT);
+
+  digitalWrite(LED_RED,   LOW);
+  digitalWrite(LED_GREEN, LOW);
+  digitalWrite(LED_YELLOW,  LOW);
+}
+
+void loop() {
+  // put your main code here, to run repeatedly:
+
+}
+
+void serialEvent() {
+    int ind=0;
+    char buff[11];
+    if(Serial.available()){
+        delay(10);
+        while(Serial.available()){
+            char c = (char)Serial.read();
+            if(ind<10){
+              buff[ind++] = c;
+            }
+        }
+        buff[ind]=0;
+
+        if      (strcmp(buff, "red")==0)  { LR = 1-LR; digitalWrite(LED_RED, LR);
+        }else if(strcmp(buff, "green")==0){ LG = 1-LG; digitalWrite(LED_GREEN, LG);
+        }else if(strcmp(buff, "yellow")==0) { LY = 1-LY; digitalWrite(LED_YELLOW, LY);
+        }
+    }
+}


added arduino controller firmware

added arduino controller firmware

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

--- DBL2_teensyctrl/BLTest2015apa102enetFastled4/BLTest2015apa102enetFastled4.ino
+++ DBL2_teensyctrl/BLTest2015apa102enetFastled4/BLTest2015apa102enetFastled4.ino
@@ -0,0 +1,125 @@
+//Ethernet to WS2811 bridge for max et
+
+
+#include "FastLED.h"
+#include <SPI.h>         // needed for Arduino versions later than 0018
+#include <Ethernet.h>
+#include <EthernetUdp.h>         // UDP library from: bjoern@cs.stanford.edu 12/30/2008
+#define NUM_LEDS 1010
+//#define DATA_PIN 2
+//#define CLOCK_PIN 3
+
+#define magicNum 603
+
+char headerBL[3];
+//char lt0[900] = {0}; //temp buffers for packets
+//char lt1[900] = {0};
+//char lt2[900] = {0};
+//char lt3[900];
+
+
+
+
+
+//Teensy 3.1
+//#define DATA_PIN    7
+//#define CLOCK_PIN   14
+
+//megatemp
+//#define DATA_PIN 4
+//#define CLOCK_PIN 5
+
+
+//teesny bitbang
+#define DATA_PIN 21
+#define CLOCK_PIN 20
+
+
+#define COLOR_ORDER BGR
+#define CHIPSET     APA102
+
+
+
+#define UDP_TX_PACKET_MAX_SIZE 700
+
+CRGB leds[NUM_LEDS];
+
+
+// Enter a MAC address and IP address for your controller below.
+// The IP address will be dependent on your local network:
+//byte mac[] = {
+//  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
+byte mac[] = {
+  0xA0, 0xAF, 0xB4, 0xAF, 0x0b, 0x03
+};
+IPAddress ip(192, 168, 1, 210);
+
+//IPAddress ip(10,4,2,10);
+
+unsigned int localPort = 6038;      // local port to listen on
+
+
+EthernetUDP Udp;
+
+// buffers for receiving and sending data
+//char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; //buffer to hold incoming packet,
+char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; //buffer to hold incoming packet
+
+
+void setup() {
+  // start the Ethernet and UDP:
+
+
+  Ethernet.begin(mac, ip);
+  Udp.begin(localPort);
+
+  // FastLED.addLeds<CHIPSET, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS);
+  // FastLED.addLeds<CHIPSET, DATA_PIN,CLOCK_PIN, COLOR_ORDER>(leds, NUM_LEDS);
+  // FastLED.addLeds<CHIPSET,DATA_PIN,CLOCK_PIN, COLOR_ORDER>(leds, NUM_LEDS);
+  FastLED.addLeds<CHIPSET, DATA_PIN, CLOCK_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
+
+FastLED.setBrightness(16);
+
+  for (int i = 0; i < NUM_LEDS; i = i + 20) {
+    // Set the i'th led to red
+    leds[i] = CRGB::Blue;
+    // Show the leds
+    FastLED.show();
+    // now that we've shown the leds, reset the i'th led to black
+    leds[i] = CRGB::Black;
+    // Wait a little bit before we loop around and do it again
+  }
+  //
+  Serial.begin(115200);
+  Serial.println("enetNeoPixel finished setup 210");
+  //Serial.println(IPAddress);
+  //Serial.println(char(mac));
+}
+
+void loop() {
+  // if there's data available, read a packet
+  int packetSize = Udp.parsePacket();
+  //  if(Udp.parsePacket())
+  if (packetSize)
+  {
+    Udp.read(headerBL, 3);
+    int shift = int(headerBL[0]);
+    Serial.println(shift);
+   // headerBL[0]=uint8_t(headerBL[0]);
+
+
+    Udp.read( (char*)(leds + shift * 200), 600);
+
+
+  }
+FastLED.show();
+ Serial.println(LEDS.getFPS());
+}
+
+
+
+
+
+
+
+


example-1 Pin

example-1 Pin

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

--- example/example-1/example-1.ino
+++ example/example-1/example-1.ino
@@ -0,0 +1,42 @@
+/**
+ * example-1
+ *
+ * 这个样例将指引您正确使用Pin类
+ * 以高效使用针脚(Pin)
+ *
+ * 本样例包含了Pin类的基本用法
+ * 至于高级膜法请参考Pin.h
+ */
+
+#include <kjArduino.h>
+
+//在setup()的外面声明一个针脚,而不是在它里面(必须)
+//至于为什么非得在外面,这涉及到Arduino源码编译原理,此处不细讲
+Pin led = Pin(13, OUTPUT);
+
+//也允许只声明针脚却不声明用途,但最好之后在setup()中初始化
+Pin button = Pin(D1);
+
+//声明一个呼吸灯
+Pin breath = Pin(9, OUTPUT);
+
+void setup(){
+    button.setMode(INPUT_PULLUP); //声明button这个针脚的用途
+}
+
+void loop(){
+    if(button.isHigh()){ //如果按钮所在针脚为高电平
+        led.setHigh(); //将LED的电平设置为高
+    }else{
+        led.setLow(); //将LED的电平设置为低
+    }
+
+    breath.fade(0, 255, 10, 1); //让呼吸灯开始呼吸,后两个参数不是必须值,参考Pin.h内的doc以了解更多
+    breath.fade(255, 0);
+
+    breath.set(233); //设置呼吸灯所在针脚的模拟值为233
+
+    button.waitTillHigh(); //让按钮锁死程序,直到按钮按下使得按钮所在针脚变为高电平
+
+    button.waitTillLow(); //让按钮锁死程序,直到松开按钮使得按钮所在针脚变为低电平
+}


Example for 2 MSGEQ7 graphic equilizer .ino file

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

--- examples/ERW_MSGEQ7_Stereo_example/ERW_MSGEQ7_Stereo_example.ino
+++ examples/ERW_MSGEQ7_Stereo_example/ERW_MSGEQ7_Stereo_example.ino
@@ -0,0 +1,86 @@
+/*Editor: Earl R. Watkins II Title: ERW_MSGEQ7_example Date: 11/04/2015
+ * Datasheet: http://www.mix-sig.com/images/datasheets/MSGEQ7.pdf
+ * Use to hook up pins properly, Also contains a recomended circuit.
+ * 7 Bands: 63Hz, 160Hz, 400Hz, 1kHz, 2.5kHz, 6.25kHz, and 16kHz
+ * notes: TIP=Left, Ring = Right, Sleeve = GND.
+ * This example requires 2 MSGEQ7 ICs.
+ * leftRead = Tip= Analog Input
+ * rightRead = Ring = Analog Input
+ * Strobe = Digital Output
+ * Reset = Digital Output
+  */
+//Libraries
+#include <ERW_MSGEQ7.h> // Add Earl's MSGEQ7 library.
+//Definitions
+#define leftRead A0 // Define analog pin to read from left MSGEQ7.
+#define rightRead A1 // Define analog pin to read from right MSGEQ7.
+#define Strobe 3 // Define output pin to strobe MSGEQ7 for Frequencies.
+#define Reset 2 // Define output pin to reset MSGEQ7 to read
+int leftAmplitudes[7]; //The Library modifies an left channel array.
+int rightAmplitudes[7]; // The Library modifies the right channel array.
+const unsigned long timeStep = 1000; // 1000ms is 1 second. This controls the sample rate.
+unsigned long Timer; // Timer to do math instead of delay
+//Objects
+ERW_MSGEQ7 VU; // Rename object
+
+void setup() // Setup -------------------------------------------------------------
+{
+  Serial.begin(9600); //Begin Serial interface
+  VU.begin(leftRead, rightRead, Strobe, Reset); //Begin graphic equilizer for stereo.
+           //Requires 2 analog read pins and 2 digital write pins.
+  Serial.println("MSGEQ7 started"); //User info.
+  Serial.print("Left: "); // Print Channel indicator.
+  Serial.println("\t\t\t\t\t\t\t\t\t\t\t\t\t\tRight: "); // Print Channel indicator.
+  Timer=millis(); // Start timer.
+}
+
+void loop() // Pete & repete ------------------------------------------------------
+{
+  if(millis()-Timer>=timeStep)
+  {
+    VU.getAmplitudes(leftAmplitudes, rightAmplitudes); // Gets amplitudes of stereo.
+                      // Must pass the name of two arrays.
+                      // One left and one right.
+    for(int i=0; i<7; i++) // Loop through all values of array.
+    {
+      printHz(i); // Print the Frequency of the value.
+      Serial.print(leftAmplitudes[i]); // Print value(0-1023).
+    }
+    for(int i=6; i>=0; i--) // Loop through all values of array.
+    {
+      printHz(i); // Print the Frequency of the value.
+      Serial.print(rightAmplitudes[i]); // Print value(0-1023).
+    }
+    Serial.println(); // New Line.
+    Timer+=timeStep; // Update timer.
+  }
+}
+
+void printHz(int sw) // Print the Frequency of the value.
+{
+  //7 Bands: 63Hz, 160Hz, 400Hz, 1kHz, 2.5kHz, 6.25kHz, and 16kHz
+  switch (sw)
+  {
+    case 1:
+      Serial.print("\t160Hz: "); //Print the current frequency
+      break;
+    case 2:
+      Serial.print("\t400Hz: "); //Print the current frequency
+      break;
+    case 3:
+      Serial.print("\t1kHz: "); //Print the current frequency
+      break;
+    case 4:
+      Serial.print("\t2.5kHz: "); //Print the current frequency
+      break;
+    case 5:
+      Serial.print("\t6.25kHz: "); //Print the current frequency
+      break;
+    case 6:
+      Serial.print("\t16kHz: "); //Print the current frequency
+      break;
+    default:
+      Serial.print("63Hz: "); //Print the current frequency
+    break;
+  }
+}


added destination signaling

added destination signaling

error: pathspec 'Microcontroller' did not match any file(s) known to git
error: pathspec 'Code/libraries/my_lib/examples/base_uno_w_lib_v2/base_uno_w_lib_v2.ino' did not match any file(s) known to git


Added files via upload

Added files via upload

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

--- 004TargetUpMiddle/DianaParteSuperior.ino
+++ 004TargetUpMiddle/DianaParteSuperior.ino
@@ -0,0 +1,273 @@
+
+//Comunicacion i2c
+//1-manager
+//2 diana inferior izqda 3 diana inferior central 4 diana inferior dcha
+//5 diana superior medio 6 diana superior alta
+
+
+// Receptor - Seria la diana de la feria
+#include <IRremote.h>
+#include <Servo.h>
+#include <Wire.h>
+
+const int ledPin =  13;
+int RECV_PIN = 11;
+Servo myservo;
+int pos = 15;
+boolean Playing;
+IRrecv irrecv(RECV_PIN);
+char MessageReceived;
+unsigned long timer = millis();
+unsigned long time_between_target = 7;
+int randNumber = 0;
+int UpDegrees = 160;  //Grados a los que la diana esta vertical
+int Shoots = 0; //Guardaremos el numero de diana y en función de ella modificaremos la dificultad
+boolean TargetUp;
+
+int DownDegrees = 15;  //Grados a los que la diana esta vertical
+int ShootAvailableDegrees = 82; //Grados a los que la diana esperará el tiro.
+boolean DirectionRightToLeft = true;
+String texto;
+decode_results results;
+
+void setup()
+{
+  Serial.begin(9600);
+  irrecv.enableIRIn(); // Start the receiver
+  myservo.attach(9);
+  //Serial.println ("Comenzamos...");
+  myservo.write(DownDegrees);
+  delay(15);
+  Playing = false;
+  pinMode(ledPin, OUTPUT);
+  Wire.begin(5);                // join i2c bus with address #2
+  Wire.onReceive(receiveEvent); // register event
+  //Serial.println (millis());ç
+  //Manager.begin(9600);
+  Playing = false;
+  //TargetUp = true;
+
+}
+
+void (* resetFunc) (void) = 0;
+
+
+void loop() {
+
+
+
+  if (Playing)
+  {
+
+    if ((timer < millis()) && (!TargetUp))
+    { //levantamos la diana transcurrido un tiempo aleatorio desde el ultimo blanco
+      Wire.beginTransmission(1); // transmit to device #1
+      Wire.write("go004");              // sends one byte
+      Wire.endTransmission();    // stop transmitting
+      if (DirectionRightToLeft)
+      { //Serial.println ("pos1");
+        for (pos = DownDegrees; pos <= ShootAvailableDegrees; pos += 1) // goes from 0 degrees to 180 degrees
+        { // in steps of 1 degree
+          myservo.write(pos);              // tell servo to go to position in variable 'pos'
+          delay(5);                       // waits 5ms for the servo to reach the position
+        }
+      }
+      else
+      {
+        for (pos = UpDegrees; pos >= ShootAvailableDegrees; pos -= 1)
+        {
+          myservo.write(pos);
+          delay(5);
+        }
+      }
+      TargetUp = true;
+      //Serial.println (pos);
+      //bajaremos la diana en 1-5 segundos depende de la dificultad
+
+      switch (Shoots) {
+        case  2:
+          time_between_target = 5;
+          //Serial.println (time_between_target);
+          break;
+        case  3:
+          time_between_target = 4;
+          //Serial.println (time_between_target);
+          break;
+
+        case  5:
+          time_between_target = 3;
+          //Serial.println (time_between_target);
+          break;
+
+        case  7:
+          time_between_target = 1;
+          //Serial.println (time_between_target);
+          break;
+      }
+    }
+
+    if (timer + (time_between_target * 1000) < millis() && TargetUp) //Si ha pasado el tiempo marcado desde el ultimo tiro, la nave continua
+    {
+      //      Serial.println (timer);
+      //      Serial.println (time_between_target * 1000);
+      //      Serial.println (timer + (time_between_target * 1000) );
+      //      Serial.println (millis());
+      //      Serial.println ("Aqui2");
+      Wire.beginTransmission(1); // transmit to device #1
+      Wire.write("nok004");              // sends one byte
+      Wire.endTransmission();    // stop transmitting
+      if (DirectionRightToLeft)
+      { //Serial.println ("pos2");
+        for (pos = ShootAvailableDegrees; pos <= UpDegrees; pos += 1)
+        {
+          myservo.write(pos);
+          delay(5);
+        }
+      }
+      else
+      {
+        for (pos = ShootAvailableDegrees ; pos >= DownDegrees; pos -= 1)
+        {
+          myservo.write(pos);
+          delay(5);
+        }
+      }
+      DirectionRightToLeft = !DirectionRightToLeft;
+      TargetUp = false;
+      randNumber = random(2, time_between_target);
+      //Serial.println (randNumber);
+      timer = randNumber * 1000 + millis();
+      randomSeed(analogRead(0));
+
+      //      Serial.println (timer);
+      //      Serial.println (millis());
+      //      Serial.println ("Aqui3");
+      irrecv.resume(); // Receive the next value
+    }
+
+
+    //delay (200);
+    if (irrecv.decode(&results) && TargetUp) {
+      //Serial.println(results.value, DEC);
+      irrecv.resume(); // Receive the next value
+      //Serial.print (millis());
+      if (results.value == 2704)  //valor que dispara el emisor de infrarrojos (apagado de tele sony)
+      {
+        Serial.print ("Blanco: ");
+        //Serial.print (millis());
+        //Manager.listen();
+        Wire.beginTransmission(1); // transmit to device #1
+        Wire.write("ok004");              // sends one byte
+        Wire.endTransmission();    // stop transmitting
+
+        Shoots = Shoots + 1;
+        randNumber = random(2, time_between_target);
+        //Serial.println (randNumber);
+        timer = randNumber * 1000 + millis();
+        randomSeed(analogRead(0));
+        //Serial.println (timer);
+        //Serial.println (millis());
+        if (DirectionRightToLeft)
+        {
+          //Serial.println ("Aqui 1");
+          myservo.write(ShootAvailableDegrees - 20);
+          delay(1500);
+          for (pos = ShootAvailableDegrees - 10 ; pos >= DownDegrees; pos -= 1)
+          {
+            myservo.write(pos);
+            delay(2);
+            //Serial.println ("Aqui 2");
+          }
+        }
+        else
+        { //Serial.println ("Aqui 3");
+          myservo.write(ShootAvailableDegrees + 20);
+          delay(1500);
+          for (pos = ShootAvailableDegrees + 10; pos <= UpDegrees; pos += 1)
+          {
+            myservo.write(pos);
+            delay(2);
+            //Serial.println ("Aqui 4");
+          }
+        }
+        delay (500);
+        TargetUp = false;
+        irrecv.resume();
+        //Serial.println (pos);
+        //delay(300);
+      }
+    }
+
+  }
+
+
+}
+
+// function that executes whenever data is received from master
+// this function is registered as an event, see setup()
+void receiveEvent(int howMany) {
+  while ( Wire.available()) { // loop through all but the last
+    char c = Wire.read(); // receive byte as a character
+    texto = texto + c;
+    Serial.print(c);         // print the character
+  }
+
+  if (texto == "rst")
+  {
+    resetFunc();
+  }
+  if (texto == "go")
+  {
+    Playing = true;
+    Serial.println ("Comienza la partida!!");
+    //    randomSeed(analogRead(0));
+    //    for (pos = 0; pos <= UpDegrees; pos += 1) // goes from 0 degrees to 180 degrees
+    //    { // in steps of 1 degree
+    //      myservo.write(pos);              // tell servo to go to position in variable 'pos'
+    //      delay(5);                       // waits 15ms for the servo to reach the position
+    //      time_between_target = 7;
+    //      Shoots = 0;
+    //
+    //
+    //    }
+    digitalWrite(ledPin, HIGH);
+    TargetUp = false;
+    timer = millis();
+    DirectionRightToLeft = true;
+    myservo.write(DownDegrees);              // tell servo to go to position in variable 'pos'
+    delay(300);                       // waits 5ms for the servo to reach the position
+  }
+  if (texto == "end")
+  {
+    Playing = false;
+    Serial.println ("Fin de la partida!!");
+    //    for (pos = UpDegrees; pos >= 0; pos -= 1) // goes from 180 degrees to 0 degrees
+    //    {
+    myservo.write(DownDegrees);              // tell servo to go to position in variable 'pos'
+    delay(300);                       // waits 5ms for the servo to reach the position
+    //    }
+    TargetUp = false;
+    Shoots = 0;
+    time_between_target = 7;
+    digitalWrite(ledPin, LOW);
+
+  }
+  if (texto == "gup")
+  {
+
+    myservo.write(UpDegrees);
+  }
+  if (texto == "gdo")
+  {
+
+    myservo.write(DownDegrees);
+  }
+  if (texto == "gme")
+  {
+
+    myservo.write(ShootAvailableDegrees);
+  }
+  texto = "";
+
+
+}


ok, let's start to move twice as far …

ok, let's start to move twice as far …

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/'


[chg] projeto de led blink do proprio arduino

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/kaiocesar/karduino.git/'


this should set all those nifty set positions a bit better


particle code

particle code

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

--- temp.ino
+++ temp.ino
@@ -0,0 +1,109 @@
+// This #include statement was automatically added by the Particle IDE.
+#include <HttpClient.h>
+
+// This #include statement was automatically added by the Particle IDE.
+#include "application.h"
+#include <HttpClient.h>
+
+int tempPin = A0;
+unsigned int nextTime = 0;    // Next time to contact the server
+char publishString[60];
+int led1 = D0;
+int led2 = D7;
+
+HttpClient http;
+http_request_t request;
+http_response_t response;
+
+// Headers currently need to be set at init, useful for API keys etc.
+http_header_t headers[] = {
+     { "Content-Type", "application/json" },
+    //  { "Accept" , "application/json" },
+    // { "Accept" , "*/*"},
+    { "Accept" , "*/*"},
+    { "User-agent", "Particle HttpClient"},
+    { NULL, NULL } // NOTE: Always terminate headers will NULL
+};
+
+void setup() {
+  Serial.begin(9600);
+  request.hostname = "picky-home.herokuapp.com";
+  request.port = 80;
+  request.path = "/readings";
+  pinMode(led1, OUTPUT);
+  pinMode(led2, OUTPUT);
+   Particle.function("led",ledToggle);
+
+   digitalWrite(led1, LOW);
+}
+
+unsigned long lasttime;
+int mesPow,mesPow2;
+
+void loop() {
+  static unsigned long tracktime;
+  static unsigned long tracktime2;
+  if(millis()>tracktime) {
+      tracktime = millis()+2000;
+      routine();
+  }
+  if(digitalRead(D1)==LOW) {
+      unsigned long thistime = millis();
+      if(thistime-lasttime>100) { // Start of the sequence
+          mesPow = 0;
+          unsigned long tracktime3 = millis();
+          int increment = 45;  // first slice
+          while(millis()<tracktime3+7*80+30) { // sequence length
+            if(millis()>tracktime) {
+              tracktime = millis()+2000;
+              routine();
+            }
+            if(millis()>tracktime3+increment) {
+                increment+=80;
+                bool val = digitalRead(D1);
+                mesPow |= val<<increment/80;
+            }
+          }
+          mesPow2 = mesPow;
+          Serial.println(mesPow2);
+      }
+      lasttime = thistime;
+  }
+}
+
+void routine() {
+  int tempReading = analogRead(tempPin);
+  float tempVolts = tempReading * 3.3 / 4095.0;
+  float tempC = (tempVolts - 0.5) * 100.0;
+  float tempF = tempC * 9.0 / 5.0 + 32.0;
+  sprintf(publishString, "{\"temp\":%f, \"energy\":%f}", tempF, tempF);
+  request.body = publishString;
+  http.post(request, response, headers);
+//   Serial.println(response.status);
+//   Serial.println(request.body);
+}
+
+int ledToggle(String command) {
+
+    if (command=="on") {
+        tone(led1,37900);
+        delay(200);
+        noTone(led1);
+        delay(200);
+        tone(led1,37900,20);
+        digitalWrite(led2,HIGH);
+        return 1;
+    }
+    else if (command=="off") {
+        tone(led1,37900);
+        delay(20);
+        noTone(led1);
+        delay(40);
+        tone(led1,37900,20);
+        digitalWrite(led2,LOW);
+        return 0;
+    }
+    else {
+        return -1;
+    }
+}


this is probably the final iteration

this is probably the final iteration

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/rosalindfdt/huzzahbadge.git/'


Added example of stetting a single bit in a defined byte to 0 or 1

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

--- Testing/MCP23017/Change1BitInAByteValue/Change1BitInAByteValue.ino
+++ Testing/MCP23017/Change1BitInAByteValue/Change1BitInAByteValue.ino
@@ -0,0 +1,55 @@
+// Used to set each bit with a bitwise or
+unsigned char hex[8]= {0x01  ,0x02  ,0x04  ,0x08  ,0x10  ,0x20  ,0x40  ,0x80};
+
+#include "Wire.h"
+void setup()
+{
+ Wire.begin(); // wake up I2C bus
+ SetPortA2Outputs();
+}
+
+void loop()
+{
+  byte sendByte = B11111111;
+  SetPinsOnPortA(SetBitInByte(sendByte,0,0));
+  delay(1000);
+  SetPinsOnPortA(sendByte);
+  delay(1000);
+}
+
+void SetPortA2Outputs()
+{
+ Wire.beginTransmission(0x20);
+ Wire.write(0x00); // IODIRA register
+ Wire.write(0x00); // set all of port A to outputs
+ Wire.endTransmission();
+}
+
+void SetPinsOnPortA(int a)
+{
+ Wire.beginTransmission(0x20);
+ Wire.write(0x12); // GPIOA
+ Wire.write(a); // port A
+ Wire.endTransmission();
+}
+
+byte SetBitInByte(byte inByte,int bitToSet, bool bitValue)
+{
+  if(bitValue)
+  {
+    // Set the bit - or
+    return inByte|hex[bitToSet];
+  }
+  else
+  {
+    // clear the bit - and (Alos need to invert hex for & to get the bit to be set. example 11111110 instead of 00000001)
+    return inByte & InvertByte(hex[bitToSet]);
+  }
+}
+
+byte InvertByte(byte inByte)
+{
+  return ~inByte;
+}
+
+


Add message checksum, avoid interrupt races

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/'


update

update

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

--- sketch_apr14a.ino
+++ sketch_apr14a.ino
@@ -0,0 +1,39 @@
+#define trigger 9
+#define echo 10
+#define motor 4
+
+long tempoTotal = 0;
+int distancia;
+
+float ultrassonic();
+void controlarMotor();
+
+void setup() {
+  pinMode(trigger,OUTPUT);
+  pinMode(echo,INPUT);
+  pinMode(motor,OUTPUT);
+
+  Serial.begin(9600);
+  digitalWrite(trigger,LOW);
+  digitalWrite(motor,LOW);
+}
+
+void loop() {
+  distancia = ultrassonic();
+  controlarMotor();
+  Serial.println(distancia);       // print as an ASCII-encoded decima
+  delay(10);
+}
+
+float ultrassonic(){
+  digitalWrite(trigger, HIGH);
+  delayMicroseconds(10);
+  digitalWrite(trigger, LOW);
+  tempoTotal = pulseIn(echo,HIGH);
+  distancia = tempoTotal*0.034/2; // velocidade do som = 340m/s
+  return distancia;
+}
+
+void controlarMotor(){
+  digitalWrite(motor,HIGH);
+}


Create AM2321Example.ino

Create AM2321Example.ino

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

--- AM2321Example.ino
+++ AM2321Example.ino
@@ -0,0 +1,48 @@
+/****************************************************************
+  This is the Spark Core example of using the library of the
+  AM2321 Humidity and Temperature sensor
+  This sensor uses custom I2C communication and supports 2 wires
+  and one wire configuration.
+
+  This example assumed a 2 wires configuration.
+
+  Written by Ed Wios.
+  Oct 2014
+ ***************************************************************/
+
+#include "AM2321.h"
+
+#include "application.h"
+
+extern char* itoa(int a, char* buffer, unsigned char radix);
+
+AM2321 am2321;
+
+char str[8];
+
+void setup()
+{
+    am2321.begin();
+    Serial.begin(BAUD);
+}
+
+void loop()
+{
+	float temp, humi;
+	unsigned int amID;
+
+	amID = am2321.readID();
+	delay(2000);
+	temp = am2321.readTemperature();
+	delay(2000);
+	humi = am2321.readHumidity();
+
+	Serial.print("ID: ");
+	Serial.print(amID);
+	Serial.print(", Temp: ");
+	Serial.print(temp);
+	Serial.print(", Humi: ");
+	Serial.println(humi);
+	delay(2000);
+}
+


check list almost finish

check list almost finish

error: pathspec 'exploration' did not match any file(s) known to git
error: pathspec 'testing/src/main.ino' did not match any file(s) known to git


sensor

sensor

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

--- sensor/sensor.ino
+++ sensor/sensor.ino
@@ -0,0 +1,251 @@
+#include <SFE_BMP180.h>
+#include <Wire.h>
+
+unsigned long prevTime;
+int tickInterval = 1000 * 5;
+unsigned long currentTicks = 0;
+String reqId = "";
+int errorState = 0;
+bool high = false;
+bool conf = false;
+
+int redPin = A7;
+int yellowPin = A9;
+int greenPin = A10;
+
+int tempStatus = 1;
+int strike = 0;
+
+// BMP-180 variables
+SFE_BMP180 bmp;
+double pressureBaseline = 0;
+double temp = 0;
+double pressure = 0;
+double altitude = 0;
+
+String appName = "PlantIT";
+
+bool nextTick(){
+  unsigned long currTime = millis();
+  if ((currTime - prevTime) > tickInterval){
+    prevTime = currTime;
+    return true;
+  }
+
+  return false;
+}
+
+void changeStatus(int s){
+  if (s == 2){
+    analogWrite(greenPin, 0);
+    analogWrite(yellowPin, 255);
+  } else if (s == 3){
+    analogWrite(yellowPin, 0);
+    analogWrite(redPin,255);
+  }
+}
+
+void resetSerial() {
+  Serial1.end();
+  Serial1.begin(9600);
+}
+
+void buildResponse(String &res) {
+  res = res + "#";
+  res = res + "@" + temp + "$";
+}
+
+double readBMP180Values()
+{
+  char status;
+  status = bmp.startTemperature();
+
+  if (status != 0)
+  {
+    delay(status);
+    status = bmp.getTemperature(temp);
+
+
+    if (status != 0)
+    {
+      status = bmp.startPressure(3);
+
+      if (status != 0)
+      {
+        delay(status);
+        status = bmp.getPressure(pressure, temp);
+
+        if (status != 0)
+        {
+          altitude = bmp.altitude(pressure, pressureBaseline + 5.6);
+          return pressure;
+        }
+        else Serial1.println("error retrieving pressure measurement\n");
+      }
+      else Serial1.println("error starting pressure measurement\n");
+    }
+    else Serial1.println("error retrieving temperature measurement\n");
+  }
+  else Serial1.println("error starting temperature measurement\n");
+}
+
+void readValues() {
+  readBMP180Values();
+}
+
+void setupBMP180() {
+  if (!bmp.begin()) {
+    Serial1.println("Error");
+    while (1);
+  }
+
+  pressureBaseline = readBMP180Values();
+}
+
+void setup() {
+  Serial1.begin(9600);
+  Serial.begin(19200);
+  setupBMP180();
+  pinMode(redPin, OUTPUT);
+  pinMode(yellowPin, OUTPUT);
+  pinMode(greenPin, OUTPUT);
+
+  analogWrite(greenPin, 255);
+
+  prevTime = millis();
+
+}
+
+void sendResponse(String &res) {
+  Serial1.print(res);
+}
+
+void checkForOperation() {
+  char operation = '0';
+
+  if (Serial1.available()) {
+    operation = char(Serial1.read());
+
+    if (operation == 'd'){
+      sendData();
+    } else if (operation == 'n'){
+      sendName();
+    } else if (operation == 'c'){
+      conf = true;
+    } else if (conf){
+      reqId = String(operation);
+    }
+  }
+}
+
+void sendName(){
+  Serial1.print("#" + appName + "$");
+}
+
+void sendData() {
+  readValues();
+  String res = String("");
+  buildResponse(res);
+  Serial1.print(res);
+}
+
+void loop() {
+  if (nextTick()){
+    readValues();
+   // Serial.println("next tick");
+    //Serial.println(errorState);
+    if (errorState != 3){
+      errorState = checkRequirements();
+      changeStatus(errorState);
+      //Serial.println(errorState);
+    }
+  }
+
+
+  checkForOperation();
+}
+
+//########################  Check values ##############################
+
+int above(double value, double threshold){
+  if (value > threshold){
+    return 3;
+  } else if (value > threshold*0.9){
+    return 2;
+  } else {
+    return 1;
+  }
+}
+
+int isFreeze(double value){
+   if (value < 0){
+      return 3;
+   } else if (value < 2) {
+    return 2;
+   } else {
+    return 1;
+   }
+}
+
+int combine(int state1, int state2){
+  if (state1 == 3 || state2 == 3){
+    return 3;
+  } else if (state1 == 2 || state2 == 2){
+    return 2;
+  } else {
+    return 1;
+  }
+}
+
+int complexCheck(double d1, double d2){
+  if (!high){
+    int res = above(temp, 30);
+    if (res == 3){
+      high = true;
+      return checkRequirements();
+    }
+    return combine(res, noMore(d1));
+  }
+
+  return combine(above(temp, 30), noMore(d2));
+}
+
+int noMore(int numberOfTicks){
+  if (currentTicks > numberOfTicks){
+    return 3;
+  } else if (currentTicks > numberOfTicks * 0.9){
+    return 2;
+  } else {
+    return 1;
+  }
+}
+
+int checkRequirements(){
+  if (reqId == "A"){
+    return complexCheck(10, 7);
+  } else if (reqId == "B"){
+    return complexCheck(8, 6);
+  } else if (reqId == "C"){
+    return complexCheck(14,11);
+  } else if (reqId == "D"){
+    return above(temp, 34);
+  } else if (reqId == "E"){
+    return isFreeze(temp);
+  } else if (reqId == "F"){
+    return above(temp, 8);
+  } else if (reqId == "0"){
+    return above(temp, 8);
+  } else if (reqId == "25"){
+     return above(temp, 25);
+  } else if (reqId == "0F"){
+    return combine(above(temp,8), isFreeze(temp));
+  } else if (reqId == "AF"){
+    return combine(complexCheck(3,2), isFreeze(temp));
+  } else if (reqId == "BF"){
+    return combine(complexCheck(8,6), isFreeze(temp));
+  } else if (reqId == "CF"){
+    return combine(complexCheck(14, 11), isFreeze(temp));
+  } else {
+    return 0;
+  }
+}


[arduino] Speeds up sending of energy to erpi1.

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/bassjansson/vera.git/'


Added pong

Added pong

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

--- pong/pong.ino
+++ pong/pong.ino
@@ -0,0 +1,129 @@
+// Define pins used by potentiometer knobs
+#define paddle_l 22
+#define paddle_r 21
+
+// Define pins used by buttons
+#define button_l 4
+#define button_r 5
+#define button_m 6
+
+// Define pins used by SPI to communicate with LCD display
+#define cs   10
+#define dc   9
+#define rst  8  // you can also connect this to the Arduino reset
+
+#include <Adafruit_GFX.h>    // Core graphics library
+#include <Adafruit_ST7735.h> // Hardware-specific library
+#include <SPI.h>
+
+// Initialize the display object with the pins we chose
+Adafruit_ST7735 tft = Adafruit_ST7735(cs, dc, rst);
+
+#define ANALOG_MAX 1024
+#define WIDTH 126
+#define HEIGHT 158
+
+#define PADDLE_SIZE 30
+
+int player1_pos = 0, player1_score = 0;
+int player2_pos = 0, player2_score = 0;
+
+float ball_x, ball_y;
+float ball_xdir, ball_ydir;
+
+void draw_paddle(int x, int y, int color) {
+  tft.drawFastVLine(x-1, y-PADDLE_SIZE/2+2, PADDLE_SIZE-4, color);
+  tft.drawFastVLine(x+0, y-PADDLE_SIZE/2, PADDLE_SIZE, color);
+  tft.drawFastVLine(x+1, y-PADDLE_SIZE/2+2, PADDLE_SIZE-4, color);
+}
+
+void draw_ball(int x, int y, int color) {
+  tft.fillCircle(x, y, 4, color);
+}
+
+void draw_score(int player, int value, int color) {
+  tft.setTextColor(color);
+  if (player == 1)
+    tft.setCursor(7, 0);
+  if (player == 2)
+    tft.setCursor(WIDTH-10, 0);
+  tft.print(value);
+}
+
+void reset_ball() {
+  ball_x = WIDTH/2;
+  ball_y = HEIGHT/2;
+  ball_xdir = 2.5;
+  if(random(2) == 0) ball_xdir *= -1;
+  ball_ydir = random(0, 5)/2;
+}
+
+void setup(void) {
+  randomSeed(analogRead(0));
+
+  pinMode(button_l, INPUT);
+  pinMode(button_r, INPUT);
+  pinMode(button_m, INPUT);
+
+  tft.initR(INITR_REDTAB);   // alternative: INITR_GREENTAB
+  tft.fillScreen(ST7735_BLACK);
+  delay(500);
+
+  tft.setTextSize(1);
+
+  reset_ball();
+}
+
+void loop() {
+  draw_ball(ball_x, ball_y, ST7735_BLACK);
+  draw_paddle(4, player1_pos, ST7735_BLACK);
+  draw_paddle(WIDTH-4, player2_pos, ST7735_BLACK);
+
+  draw_score(1, player1_score, ST7735_BLACK);
+  draw_score(2, player2_score, ST7735_BLACK);
+
+  player1_pos = HEIGHT - (analogRead(paddle_l) * HEIGHT / ANALOG_MAX);
+  player2_pos = HEIGHT - (analogRead(paddle_r) * HEIGHT / ANALOG_MAX);
+
+  // If ball goes to top or bottom, just bounce
+  if (ball_y < 4 || ball_y > HEIGHT-4) {
+    ball_ydir *= -1;
+  }
+
+  // If ball hits player 1's paddle, bounce
+  if (ball_x > 4 && ball_x < 8 &&
+      ball_y > (player1_pos - PADDLE_SIZE/2) &&
+      ball_y < (player1_pos + PADDLE_SIZE/2)) {
+    ball_xdir *= -1;
+    ball_ydir += (ball_y - player1_pos) / PADDLE_SIZE * 2.5;
+  }
+
+  // If ball hits player 2's paddle, bounce
+  if (ball_x > WIDTH-8 && ball_x < WIDTH-4 &&
+      ball_y > (player2_pos - PADDLE_SIZE/2) &&
+      ball_y < (player2_pos + PADDLE_SIZE/2)) {
+    ball_xdir *= -1;
+    ball_ydir += (ball_y - player2_pos) / PADDLE_SIZE * 2.5;
+  }
+
+  ball_x += ball_xdir;
+  ball_y += ball_ydir;
+  // If ball gets behind either player, it's gone
+  if (ball_x < 0) {
+    player2_score++;
+    reset_ball();
+  }
+  if (ball_x > WIDTH) {
+    player1_score++;
+    reset_ball();
+  }
+
+  draw_ball(ball_x, ball_y, ST7735_BLUE);
+  draw_paddle(4, player1_pos, ST7735_WHITE);
+  draw_paddle(WIDTH-4, player2_pos, ST7735_WHITE);
+
+  draw_score(1, player1_score, ST7735_RED);
+  draw_score(2, player2_score, ST7735_RED);
+
+  delay(30);
+}


prepare for relay support

prepare for relay support

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/'


first version

first version

SW-420 is a motion sensor. Soldered on a Grove protoshield, together
with a LED which light on when motion/shock is triggered.

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/flashypepo/smartdevices.git/'


keep reading until u_X_dis reach good range


added arduino nano firmware

added arduino nano firmware

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

--- jsk_2016_01_baxter_apc/firmware/arm_manager.ino
+++ jsk_2016_01_baxter_apc/firmware/arm_manager.ino
@@ -0,0 +1,201 @@
+#include <SPI.h>
+#include <ros.h>
+#include <std_msgs/String.h>
+#include <std_msgs/Bool.h>
+#include <std_msgs/Float64.h>
+#include <std_msgs/Int16.h>
+#include <Servo.h>
+
+unsigned long int temp_raw, pres_raw;
+signed long int t_fine;
+
+uint16_t dig_T1;
+int16_t dig_T2;
+int16_t dig_T3;
+uint16_t dig_P1;
+int16_t dig_P2;
+int16_t dig_P3;
+int16_t dig_P4;
+int16_t dig_P5;
+int16_t dig_P6;
+int16_t dig_P7;
+int16_t dig_P8;
+int16_t dig_P9;
+int8_t  dig_H1;
+int16_t dig_H2;
+int8_t  dig_H3;
+int16_t dig_H4;
+int16_t dig_H5;
+int8_t  dig_H6;
+
+ros::NodeHandle nh; //write with IDE
+// ros::NodeHandle_<ArduinoHardware, 1, 2, 512, 512> nh;
+
+std_msgs::Float64 float_msg;
+std_msgs::Bool bool_msg;
+
+ros::Publisher pressure_pub("vacuum_gripper/limb/right/pressure", &float_msg);
+ros::Publisher state_pub("gripper_grabbed/limb/right/state", &bool_msg);
+
+unsigned long  publisher_timer = 0;
+
+Servo myservo;
+
+void servoCb(const std_msgs::Int16& angle_msg)
+{
+    myservo.write(angle_msg.data);
+}
+
+ros::Subscriber<std_msgs::Int16> servo_sub("vacuum_gripper/limb/right/servo", &servoCb);
+
+void setup() {
+    init_servo();
+    pinMode(SS, OUTPUT);
+    digitalWrite(SS, HIGH);
+    nh.getHardware()->setBaud(57600);
+    nh.initNode();
+    nh.subscribe(servo_sub);
+    nh.advertise(pressure_pub);
+    nh.advertise(state_pub);
+
+    SPI.begin();
+    SPI.setClockDivider(SPI_CLOCK_DIV8);
+    initBME();
+    readTrim();
+}
+
+
+void loop() {
+    float temp_act = 0.0, press_act = 0.0;
+    unsigned long int press_cal, temp_cal;
+
+    if (millis() > publisher_timer) {
+        readData();
+        temp_cal = calibration_T(temp_raw);
+        press_cal = calibration_P(pres_raw);
+        temp_act = (float)temp_cal / 100.0;
+        press_act = (float)press_cal / 100.0;
+
+        bool_msg.data = (press_act < 900);
+        float_msg.data = press_act;
+
+        state_pub.publish(&bool_msg);
+        pressure_pub.publish(&float_msg);
+
+        publisher_timer = millis() + 100;
+    }
+    nh.spinOnce();
+}
+
+void init_servo()
+{
+    myservo.attach(9);
+}
+
+void initBME()
+{
+    digitalWrite(SS, LOW);
+    SPI.transfer((0xF5 & 0x7F));
+    SPI.transfer(0xA0);
+    SPI.transfer((0xF4 & 0x7F));
+    SPI.transfer(0x27);
+    digitalWrite(SS, HIGH);
+}
+
+void readTrim()
+{
+    uint8_t data[32];
+    int i;
+    digitalWrite(SS, LOW);
+    SPI.transfer((0x88 | 0x80));
+    for (i = 0; i < 24; i++) {
+        data[i] = SPI.transfer(0);
+    }
+    digitalWrite(SS, HIGH);
+    delay(1);
+    digitalWrite(SS, LOW);
+    SPI.transfer((0xA1 | 0x80));
+    data[24] = SPI.transfer(0);
+    digitalWrite(SS, HIGH);
+    delay(1);
+    digitalWrite(SS, LOW);
+    SPI.transfer((0xE1 | 0x80));
+    for (i = 25; i < 32; i++) {
+        data[i] = SPI.transfer(0);
+    }
+    digitalWrite(SS, HIGH);
+
+    dig_T1 = (data[1] << 8) | data[0];
+    dig_T2 = (data[3] << 8) | data[2];
+    dig_T3 = (data[5] << 8) | data[4];
+    dig_P1 = (data[7] << 8) | data[6];
+    dig_P2 = (data[9] << 8) | data[8];
+    dig_P3 = (data[11] << 8) | data[10];
+    dig_P4 = (data[13] << 8) | data[12];
+    dig_P5 = (data[15] << 8) | data[14];
+    dig_P6 = (data[17] << 8) | data[16];
+    dig_P7 = (data[19] << 8) | data[18];
+    dig_P8 = (data[21] << 8) | data[20];
+    dig_P9 = (data[23] << 8) | data[22];
+    dig_H1 = data[24];
+    dig_H2 = (data[26] << 8) | data[25];
+    dig_H3 = data[27];
+    dig_H4 = (data[28] << 4) | (0x0F & data[29]);
+    dig_H5 = (data[30] << 4) | ((data[29] >> 4) & 0x0F);
+    dig_H6 = data[31];
+}
+
+void readData()
+{
+    uint32_t data[8];
+    int i;
+    digitalWrite(SS, LOW);
+    SPI.transfer((0xF7 | 0x80));
+    for (i = 0; i < 8; i++) {
+        data[i] = SPI.transfer(0x00);
+    }
+    digitalWrite(SS, HIGH);
+    pres_raw = (data[0] << 12) | (data[1] << 4) | (data[2] >> 4);
+    temp_raw = (data[3] << 12) | (data[4] << 4) | (data[5] >> 4);
+}
+
+signed long int calibration_T(signed long int adc_T)
+{
+
+    signed long int var1, var2, T;
+    var1 = ((((adc_T >> 3) - ((signed long int)dig_T1 << 1))) * ((signed long int)dig_T2)) >> 11;
+    var2 = (((((adc_T >> 4) - ((signed long int)dig_T1)) * ((adc_T >> 4) - ((signed long int)dig_T1))) >> 12) * ((signed long int)dig_T3)) >> 14;
+
+    t_fine = var1 + var2;
+    T = (t_fine * 5 + 128) >> 8;
+    return T;
+}
+
+unsigned long int calibration_P(signed long int adc_P)
+{
+    signed long int var1, var2;
+    unsigned long int P;
+    var1 = (((signed long int)t_fine) >> 1) - (signed long int)64000;
+    var2 = (((var1 >> 2) * (var1 >> 2)) >> 11) * ((signed long int)dig_P6);
+    var2 = var2 + ((var1 * ((signed long int)dig_P5)) << 1);
+    var2 = (var2 >> 2) + (((signed long int)dig_P4) << 16);
+    var1 = (((dig_P3 * (((var1 >> 2) * (var1 >> 2)) >> 13)) >> 3) + ((((signed long int)dig_P2) * var1) >> 1)) >> 18;
+    var1 = ((((32768 + var1)) * ((signed long int)dig_P1)) >> 15);
+    if (var1 == 0)
+    {
+        return 0;
+    }
+    P = (((unsigned long int)(((signed long int)1048576) - adc_P) - (var2 >> 12))) * 3125;
+    if (P < 0x80000000)
+    {
+        P = (P << 1) / ((unsigned long int) var1);
+    }
+    else
+    {
+        P = (P / (unsigned long int)var1) * 2;
+    }
+    var1 = (((signed long int)dig_P9) * ((signed long int)(((P >> 3) * (P >> 3)) >> 13))) >> 12;
+    var2 = (((signed long int)(P >> 2)) * ((signed long int)dig_P8)) >> 13;
+    P = (unsigned long int)((signed long int)P + ((var1 + var2 + dig_P7) >> 4));
+    return P;
+}


Move WiFi connect debug messages

Move WiFi connect debug messages

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/spoollord/MyOurWeather.git/'


Added the code for the compass.ino and accelerometer.ino files.

We still will need to ensure that we can integrate these systems.

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/ocean-x/erikson-1.git/'


added rtc example.

added rtc example.

error: pathspec 'arduino/opencr_arduino/opencr/libraries/OpenCR/examples/10.' did not match any file(s) known to git
error: pathspec 'Etc/rtc_time/rtc_time.ino' did not match any file(s) known to git