Untested, not yet ready version to test MIDI event communication

/*
 Test pseudo-MIDI commands from a 3x2 key matrix.

 Turns on a LED when at least one key is pressed.

 The circuit:
 * LED built in to pin 13, connected to ground
 * Key matrix: C, C#, and D from two keyboards
   * C into digital pin 8
   * C# into digital pin 9
   * D into digital pin 10
   * Internal pull-up resistors activated for all inputs
 * Keyboard 0 - pin 69 (analog 15)
 * Keyboard 1 - pin 68 (analog 14)
 * Six diodes allowing facing away from the inputs (allowing
   current to be sunk, and hence inputs pulled down,
   but open circuit otherwise)

 created 2016 by @JDWarner
*/

// constants won't change. They're used here to
// set pin numbers:
const int keyPins[] = {8, 9, 10};  // organ keys C, C#, D
const int rankPins[] = {69, 68};   // drive wires for rank 0 (top) and 1 (bottom)
const int ledPin = LED_BUILTIN;  // LED pin
/*
  Note for reference, the analog -> digital pin mappings for the Mega are:
  A0 = 54
  A1 = 55
  A2 = 56
  A3 = 57
  A4 = 58
  A5 = 59
  A6 = 60
  A7 = 61
  A8 = 62
  A9 = 63
  A10 = 64
  A11 = 65
  A12 = 66
  A13 = 67
  A14 = 68
  A15 = 69
*/

// define how large some things are (matrix size)
const int numKeys = 3;
const int numRanks = 2;
const int midiNotes[numRanks][numKeys] = {
  {9, 10, 11},
  {9, 10, 11},
};
const int midiChannels[numRanks] = {0, 1};

// State of all keys in a 2D multidimensional array
bool keyStates[numRanks][numKeys] = {
  {false,  false,  false},
  {false,  false,  false},
};

// Reading all pins for a particular loop
bool keyReads[] = {false, false, false};
int activeKeys = 0;

// simple function to compare current state with new read
// if different, state and LED are updated
// We're using input_pullup so the switch is active when LOW!
// Note: Internally changing `state` requires call-by-reference
void pinChange(bool value, bool &state, int pin) {
  // Compare them - `state` records inverse of switch read
  if (value == state) { // Equal means a change

    // Update values in state record
    state = not value;

    // If there is a state change, send a MIDI event
    // Serial.write();
    // Serial.write();
    // Serial.write();
  }
}

// function to handle the loop over a given rank, updating states
void rankPoll(int keyPins[numKeys], bool (&states)[numKeys]) {
  for(int key=0; key<numKeys; key++){
      // states[key] = not digitalRead(keyPins[key]);
      pinChange(digitalRead(keyPins[key]), states[key], keyPins[key]);
  }
}

void setup() {
  // Start the Serial interface
  // Serial.begin(31280)  // Check baud

  // initialize LED
  pinMode(ledPin, OUTPUT);

  // drive pins per rank
  for(int d=0; d<numRanks; d++){
      pinMode(d, OUTPUT);
      digitalWrite(d, HIGH);
  }
  // initialize the organ keys' pins as inputs
  for(int k=0; k<numKeys; k++){
      pinMode(k, INPUT_PULLUP);
  }
}

void loop() {
  // read the state of the key value:
  for(int rank = 0; rank < numRanks; rank++){
      digitalWrite(rankPins[rank], LOW);
      rankPoll(keyPins, keyStates[rank]);
      digitalWrite(rankPins[rank], HIGH);
   }

  // light an LED if any key is pressed
  activeKeys = 0;
  for(int rank=0; rank<numRanks; rank++){
      // shortcut loop if any key press found
      if(activeKeys > 0){
          break;
      }
      for(int key=0; key<numKeys; key++){
          // if key pressed, turn on LED, record, and stop looking
          if (keyStates[rank][key] == true) {
            digitalWrite(ledPin, HIGH);
            activeKeys++;
            break;
          }
      }
  }

  // LED off if no keys pressed
  if(activeKeys == 0){
      digitalWrite(ledPin, LOW);
  }
}

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


Fixed incorrect libary declaration

Fixed incorrect libary declaration

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/TheBeachMaster/AfricasTalkingIOT.git/'


mqtt node for HAP-NodeJS

mqtt node for HAP-NodeJS

// Using Sonoff wifi switch, 80MHz, 1M
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include <WiFiClientSecure.h>
#include <PubSubClient.h>
#include <ArduinoJson.h>
#include <Ticker.h>

#include "/usr/local/src/rpi2_setting.h"

#define BUTTON_PIN 0
#define RELAY_PIN 12
#define LED_PIN 13

IPAddress mqtt_server = MQTT_SERVER;

char* subscribe_topic = "light/bedroomlight";
long lastReconnectAttempt = 0;
volatile bool bUpdated = false;
volatile bool bRelayState = false;
String clientName;

void ICACHE_RAM_ATTR callback(char* intopic, byte* inpayload, unsigned int length);

WiFiClientSecure sslclient;
PubSubClient client(mqtt_server, 8883, callback, sslclient);
Ticker ticker;

void tick()
{
  //toggle state
  int state = digitalRead(LED_PIN);  // get the current state of GPIO13 pin
  digitalWrite(LED_PIN, !state);     // set pin to the opposite state
}

void ICACHE_RAM_ATTR parseMqttMsg(String receivedpayload, String receivedtopic)
{
  char json[] = "{\"cmd\":\"off\"}";

  receivedpayload.toCharArray(json, 150);
  StaticJsonBuffer<150> jsonBuffer;
  JsonObject& root = jsonBuffer.parseObject(json);

  if (!root.success())
  {
    return;
  }

  if (receivedtopic == subscribe_topic)
  {
    if (root.containsKey("cmd"))
    {
      const char* mqtt_relay_state = root["cmd"];
      if ( String(mqtt_relay_state) == "on")
      {
        Serial.println("call on");
        bRelayState = HIGH;
      }
      else
      {
        Serial.println("call off");
        bRelayState = LOW;
      }
      bUpdated = true;
    }
  }
}

void ICACHE_RAM_ATTR callback(char* intopic, byte* inpayload, unsigned int length)
{
  String receivedtopic = intopic;
  String receivedpayload ;

  for (unsigned int i = 0; i < length; i++)
  {
    receivedpayload += (char)inpayload[i];
  }

  Serial.print("[MQTT] intopic : ");
  Serial.print(receivedtopic);
  Serial.print(" payload: ");
  Serial.println(receivedpayload);

  parseMqttMsg(receivedpayload, receivedtopic);
}

bool verifytls()
{
  Serial.print("[MQTT] tls connecting to ");
  Serial.println(mqtt_server);
  if (!sslclient.connect(mqtt_server, 8883))
  {
    Serial.println("[MQTT] tls connection failed");
    return false;
  }

  if (sslclient.verify(MQTT_FINGERPRINT, MQTT_SERVER_CN))
  {
    Serial.println("[MQTT] tls certificate matches");
    sslclient.stop();
    return true;
  }
  else
  {
    Serial.println("[MQTT] tls certificate doesn't match");
    sslclient.stop();
    return false;
  }
}

boolean reconnect()
{
  if (!client.connected())
  {
    if (verifytls())
    {
      if (client.connect((char*) clientName.c_str(), MQTT_USER, MQTT_PASS))
      {
        client.subscribe(subscribe_topic);
        client.loop();
        Serial.println("[MQTT] mqtt connected");
        ticker.attach(1, tick);
      }
      else
      {
        Serial.print("[MQTT] mqtt failed, rc=");
        Serial.println(client.state());
        ticker.attach(0.5, tick);
      }
    }
  }
  return client.connected();
}

void wifi_connect()
{
  if (WiFi.status() != WL_CONNECTED)
  {
    Serial.println();
    Serial.print("[WIFI] Connecting to ");
    Serial.println(WIFI_SSID);

    delay(10);
    WiFi.mode(WIFI_STA);
    WiFi.begin(WIFI_SSID, WIFI_PASSWORD);

    int Attempt = 0;
    while (WiFi.status() != WL_CONNECTED)
    {
      Serial.print(". ");
      Serial.print(Attempt);
      delay(100);
      Attempt++;
      if (Attempt == 150)
      {
        Serial.println();
        Serial.println("[WIFI] Could not connect to WIFI, restarting...");
        Serial.flush();
        ESP.restart();
        delay(200);
      }
    }

    Serial.println();
    Serial.print("[WIFI] connected");
    Serial.print(" --> IP address: ");
    Serial.println(WiFi.localIP());
  }
}

void change_light()
{
  digitalWrite(RELAY_PIN, bRelayState);
  bUpdated = false;
  attachInterrupt(BUTTON_PIN, run_lightcmd_isr, FALLING);
}

void run_lightcmd_isr()
{
  detachInterrupt(BUTTON_PIN);
  bRelayState = !bRelayState;
  bUpdated = true;
}

void ArduinoOTA_config()
{
  //OTA
  // Port defaults to 8266
  ArduinoOTA.setPort(8266);
  ArduinoOTA.setHostname("esp-bedroomlight");
  ArduinoOTA.setPassword(OTA_PASSWORD);
  ArduinoOTA.onStart([]()
  {
    //sendUdpSyslog("ArduinoOTA Start");
  });
  ArduinoOTA.onEnd([]()
  {
    //sendUdpSyslog("ArduinoOTA End");
  });
  ArduinoOTA.onProgress([](unsigned int progress, unsigned int total)
  {
    //syslogPayload = "Progress: ";
    //syslogPayload += (progress / (total / 100));
    //sendUdpSyslog(syslogPayload);
  });
  ArduinoOTA.onError([](ota_error_t error)
  {
    //ESP.restart();
    if (error == OTA_AUTH_ERROR) abort();
    else if (error == OTA_BEGIN_ERROR) abort();
    else if (error == OTA_CONNECT_ERROR) abort();
    else if (error == OTA_RECEIVE_ERROR) abort();
    else if (error == OTA_END_ERROR) abort();
  });

  ArduinoOTA.begin();
}

void setup()
{
  Serial.begin(115200);
  Serial.println();
  Serial.println("Starting....... ");
  pinMode(LED_PIN, OUTPUT);
  pinMode(RELAY_PIN, OUTPUT);
  pinMode(BUTTON_PIN, INPUT);

  attachInterrupt(BUTTON_PIN, run_lightcmd_isr, FALLING);

  ticker.attach(0.2, tick);

  wifi_connect();

  clientName += "esp8266-";
  uint8_t mac[6];
  WiFi.macAddress(mac);
  clientName += macToStr(mac);
  clientName += "-";
  clientName += String(micros() & 0xff, 16);

  configTime(9 * 3600, 0, "pool.ntp.org", "time.nist.gov");

  ArduinoOTA_config();

  reconnect();
  lastReconnectAttempt = 0;
}

void loop()
{
  if (bUpdated)
  {
    change_light();
  }

  if (WiFi.status() == WL_CONNECTED)
  {
    if (!client.connected())
    {
      long now = millis();
      if (now - lastReconnectAttempt > 5000)
      {
        lastReconnectAttempt = now;
        if (reconnect())
        {
          lastReconnectAttempt = 0;
        }
      }
    }
    else
    {
      client.loop();
    }
  }
  else
  {
    ticker.attach(0.2, tick);
    wifi_connect();
  }
}

String macToStr(const uint8_t* mac)
{
  String result;
  for (int i = 0; i < 6; ++i)
  {
    result += String(mac[i], 16);
    if (i < 5)
      result += ':';
  }
  return result;
}

// end of file

error: pathspec '_70-homekit-accessories-light/_70-homekit-accessories-light.ino' did not match any file(s) known to git


Fix #82

Fix #82

/**************************************************************
 * 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 synchronize Button widget
 * and physical button state.
 *
 * WARNING :
 * For this example you'll need SimpleTimer library:
 *   https://github.com/jfturcot/SimpleTimer
 *
 * App project setup:
 *   Button widget attached to V2 (Switch mode)
 *
 **************************************************************/

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <SPI.h>
#include <Ethernet.h>
#include <BlynkSimpleEthernet.h>
#include <SimpleTimer.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";

// Set your LED and physical button pins here
const int ledPin = 7;
const int btnPin = 8;

SimpleTimer timer;
void checkPhysicalButton();

int ledState = LOW;
int btnState = HIGH;

void setup()
{
  Serial.begin(9600); // See the connection status in Serial Monitor
  Blynk.begin(auth);

  pinMode(ledPin, OUTPUT);
  pinMode(btnPin, INPUT_PULLUP);
  digitalWrite(ledPin, ledState);

  // Setup a function to be called every 100 ms
  timer.setInterval(100L, checkPhysicalButton);
}

// Every time we connect to the cloud...
BLYNK_CONNECTED() {
  // Request the latest state from the server
  Blynk.syncVirtual(V2);

  // Alternatively, you could override server state using:
  //Blynk.virtualWrite(V2, ledState);
}

// When App button is pushed - switch the state
BLYNK_WRITE(V2) {
  ledState = param.asInt();
  digitalWrite(ledPin, ledState);
}

void checkPhysicalButton()
{
  if (digitalRead(btnPin) == LOW) {
    // btnState is used to avoid sequential toggles
    if (btnState != LOW) {

      // Toggle LED state
      ledState = !ledState;
      digitalWrite(ledPin, ledState);

      // Update Button Widget
      Blynk.virtualWrite(V2, ledState);
    }
    btnState = LOW;
  } else {
    btnState = HIGH;
  }
}

void loop()
{
  Blynk.run(); // Run Blynk
  timer.run(); // Run SimpleTimer
}

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


Retrieve measurements in mm/s2 (part 2)

Retrieve measurements in mm/s2 (part 2)

#include "I2Cdev.h"//add neccesary headfiles
#include "MPU6050.h"//add neccesary headfiles
#include <Wire.h>
#include <Streaming.h>
#include <string.h>
#include <math.h>
//====the offset of gyro===========
#define Gx_offset  -1.50
#define Gy_offset  0
#define Gz_offset  0.80
//====the offset of accelerator===========
#define Ax_offset -0.07
#define Ay_offset 0.02
#define Az_offset 0.14
//====================
MPU6050 accelgyro;

#define REG_ADDR_RESULT         0x00
#define REG_ADDR_CONFIG         0x02

#define ADDR_ADC121             0x58

int16_t ax,ay,az;//original data;
int16_t gx,gy,gz;//original data;
float Ax,Ay,Az;//Unit g(9.8m/s^2)
float Gx,Gy,Gz;//Unit ��/s
float loudness;

char buffer [1000];

int measurementMode = 0;

/*
 * Initialise the IMU
 */
void initialiseAccelerationAndGyro() {
   // Initializing IMU sensor
   accelgyro.initialize();

   // Testing connections with IMU
   Serial.println(accelgyro.testConnection() ? "IMU connection successful":"IMU connection failure");
}

/*
 * Initialise the loudness sensor
 */
void initialiseLoudnessSensor()
{
   Wire.beginTransmission(ADDR_ADC121);        // transmit to device
   Wire.write(REG_ADDR_CONFIG);                // Configuration Register
   Wire.write(0x20);
   Wire.endTransmission();
}

/*
 * Update the acceleration and Orientation values
 */
void updateAccelerationAndGyro() {
   accelgyro.getMotion6(&ax,&ay,&az,&gx,&gy,&gz);//get the gyro and accelarator

   Serial.println(ax);

   //==========accelerator================================
   Ax=ax;///16384.00;//to get data of unit(g)
   Ay=ay;///16384.00;//to get data of unit(g)
   Az=az;///16384.00;//to get data of unit(g)
   //===============gyro================================
   Gx=gx;///131.00;
   Gy=gy;///131.00;
   Gz=gz;///131.00;
}

/*
 * Update the loudness value
 */
void updateLoudness()
{
    int getData;
    Wire.beginTransmission(ADDR_ADC121);        // transmit to device
    Wire.write(REG_ADDR_RESULT);                // get reuslt
    Wire.endTransmission();

    Wire.requestFrom(ADDR_ADC121, 2);           // request 2byte from device
    delay(1);

    if(Wire.available()<=2)
    {
      getData = (Wire.read()&0x0f)<<8;
      getData |= Wire.read();
      loudness = getData;
    }
}

/*
 * Convert a double to a char array
 */
int dToBuffer(float value, char* buffer, int start)
{
  int origin = start;
  /*if (value >= 1000)
  {
    return -1;
  }*/

  int mode = 0;
  long v = (long)(value * 1000LL);

  if (v < 0)
  {
    buffer[start++] = '-';
    v = abs(v);
  }

  int i = 10;
  while (i > 0)
  {
    long b = pow(10, i--);
    int _v = v/b;
    if (mode || _v > 0)
    {
      buffer[start++] = (char)(_v+48);
      mode = 1;
    }
    v = v - _v*b;
    if (i == 2)
    {
      if (buffer[start-1] == '-')
      {
        buffer[start++] = '0';
      }
      else if (origin - start == 0)
      {
        buffer[start++] = '0';
      }

      buffer[start++] = '.';
    }
  }

  if (buffer[start-1] == '.')
  {
    buffer[start++] = '0';
  }

  buffer[start] = '\0';
  return start;
}

/*
 * Utility to copy arrays
 */
int copyOver(char origin[], char target[], unsigned int size, unsigned int start)
{
    int index = 0;
    while (index < size)
    {
        target[start + index] = origin[index];
        index++;
    }

    return start+index;
}

/*
 * Buffer the current sensor measurements
 */
int bufferSensorData(int start)
{
  if (start < 0)
  {
    return -1;
  }

  char text[] = { '#', 'M', 'E', 'A', 'S', 'U', 'R', 'E', 'M', 'E', 'N', 'T', '|' };

  start = copyOver(text, buffer, 13, start);
  start = dToBuffer(Ax, buffer, start);
  buffer[start++] = '|';
  start = dToBuffer(Ay, buffer, start);
  buffer[start++] = '|';
  start = dToBuffer(Az, buffer, start);
  buffer[start++] = '|';
  start = dToBuffer(Gx, buffer, start);
  buffer[start++] = '|';
  start = dToBuffer(Gy, buffer, start);
  buffer[start++] = '|';
  start = dToBuffer(Gz, buffer, start);
  buffer[start++] = '|';
  start = dToBuffer(loudness, buffer, start);
  buffer[start++] = '#';
  buffer[start] = '\0';

  return start;
}

/*
 * Transmit the buffer to the base
 */
boolean bleTransmitBuffer()
{
  if (Serial1)
  {
    Serial1.write(buffer);
    //Serial.println(buffer);
    Serial1.flush();
    return true;
  }
  else
  {
    return false;
  }
}

/*
 * Initialise components and devices
 */
void setup() {
    // Console (remove when not used)
    Serial.begin(9600);

    // Connect to the BLE module
    Serial1.begin(38400);

    Wire.begin();

    initialiseAccelerationAndGyro();
    initialiseLoudnessSensor();
}

void loop() {
  while (true)
  {
    if (Serial1.available())
    {
      measurementMode = Serial1.read();
    }

    //If greater than 0 => take measurement
    if (measurementMode > 48)
    {
      updateAccelerationAndGyro();
      updateLoudness();

      // If measurement mode is 2 or less, do not buffer
      if (measurementMode <= 50)
      {
        bufferSensorData(0);
        while(!bleTransmitBuffer());
        delay(50);
      }
      else
      {
        /*

          BUFFER MEASUREMENTS AND SEND WHEN BUFFER IS FULL

        */

        //change delay to whatever you need
        delay(50);
      }
    }

    // if measurement mode is 1 (49) => one measurement only
    if (measurementMode < 50)
    {
      measurementMode = 0;
    }

  }
}

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


Update CoinWallet.ino

Update CoinWallet.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/ivegotasthma/washmashine.git/'


Interactive calibration for Otto DIY.

Interactive calibration for Otto DIY.

//----------------------------------------------------------------
//-- Otto Easy calibration
//-- With this code you can calibrate the servo motors butit will require to adjust the TRIM values
//-- April 2019: Designed to work with the basic Otto but could be compatible with PLUS or Humanoid or other biped robots
//-- September 2019: Added Interactive interface
/******************************************************************************************************
  Make sure to have installed all libraries: https://wikifactory.com/+OttoDIY/otto-diy
  Otto DIY invests time and resources providing open source code and hardware,
  please support by purchasing kits from (https://www.ottodiy.com)

  BSD license, all text above must be included in any redistribution
 *******************************************************************/
//-- VERY IMPORTANT only calibrate ONE TIME per board!to avoid damage EEPROM memory
//-----------------------------------------------------------------
#include <Otto.h>
#include <Servo.h>
#include <Oscillator.h>
#include <EEPROM.h>
Otto Otto;

int positions[] = {90, 90, 90, 90};

uint8_t servo = 0;
int8_t trims[4] = {0,0,0,0};

// Set all 4 trim values

void setTrims(void)
{
  Otto.setTrims(trims[0], trims[1], trims[2], trims[3]);
  Serial.print("Setting trim [");
  for( int x = 0; x < 4 ; x++)
  {
    Serial.print(trims[x]);
    Serial.print(", ");
  }
  Serial.println("]");
}

// printout the help screen

void help(void)
{
  Serial.println("This is used to set the trim on the servos for 'Otto'");
  Serial.println("The interface uses single character controls");
  Serial.println("");
  Serial.println("'e' - read EEPROM trims and use them");
  Serial.println("'h' - this message");
  Serial.println("'+' - add to the trim");
  Serial.println("'-' - subtract from the trim");
  Serial.println("'L' - trim the Left Leg");
  Serial.println("'l' - trim the Left Foot");
  Serial.println("'R' - trim the Right Leg");
  Serial.println("'r' - trim the Right Foot");
  Serial.println("'w' - write the current trims to  EEPROM");
  Serial.println("");
}

// process the user input char

void processChar(char c)
{
  // see if the first char is a number or a command char

  switch(c) {
    case 'h':
    case 'H':
      help();
      break;
    case 'L':
      // set the servo to left leg
      Serial.println("Selected Left Leg");
      servo = 0;
      break;
    case 'l':
      Serial.println("Selected Left Foot");
      servo = 2;
      break;
    case 'R':
      Serial.println("Selected Right Leg");
      servo = 1;
      break;
    case 'r':
      Serial.println("Selected Right Foot");
      servo = 3;
      break;
    case '+':
      trims[servo]++;
      setTrims();
      break;
    case '-':
      trims[servo]--;
      setTrims();
      break;
    case 'e':
      for (int i = 0; i < 4; i++)
      {
        int servo_trim = EEPROM.read(i);

        if (servo_trim > 128)
          servo_trim -= 256;

        trims[i] = servo_trim;
      }
      setTrims();
      break;
    case 'w':
    case 'W':
      // write the values out to EEPROM
      Otto.saveTrimsOnEEPROM();
      Serial.println("Values written to EEPROM");
      break;
    case '\n':
    case '\r':
      break;
    default:
      Serial.print("Unknown command (");
      Serial.print(c);
      Serial.println(")");
      break;
  }
  Otto._moveServos(10, positions);
}

// init all things

void setup(void)
{
  // Init Serial port

  Serial.begin(57600);

  // init Otto

  Otto.init(2, 3, 4, 5, false);

  help();

  // read the EEPROM and use those values

  for (int i = 0; i < 4; i++)
  {
    int servo_trim = EEPROM.read(i);

    if (servo_trim > 128)
      servo_trim -= 256;

    trims[i] = servo_trim;
  }

  Serial.println("Getting EEPROM Trim values");
  // set the trims

  setTrims();

  Otto._moveServos(10, positions);
}

// see if the user wants anything

void loop()  // test comparing before & after function
{
  Otto.home();

  // get input from Serial port

  while(Serial.available() > 0)
  {
    processChar(Serial.read());
  }

 // delay(4000);
 // Otto.updown(6, 500, BIG);
 // delay(2000);
 //
 // Otto.walk(4,1800);
 //delay(2000);
}

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


servidor com temperatura funcionando

servidor com temperatura funcionando

/*

*/

#include "WiFiEsp.h"
#include "SoftwareSerial.h"

SoftwareSerial ESP8266(10, 11); // RX do Arduino, TX do Arduino
WiFiEspServer servidor(80);

char ssid[] = "codedecay";                 // nome do access point
char pass[] = "codedecay2017";         // senha do access point

// use a ring buffer to increase speed and reduce memory allocation
RingBuffer buf(8);

void setup() {
    Serial.begin(9600);     // inicia a comunicacao serial para debug
    ESP8266.begin(9600);    // inicializa a comunicacao com o ESP8266
    WiFi.init(&ESP8266);    // initialize ESP module

    Serial.print("Tentando iniciar o Access Point ");
    Serial.println(ssid);

    if ( WiFi.beginAP(ssid, 10, pass, ENC_TYPE_WPA2_PSK) ) { // inicia o access point

        IPAddress ip = WiFi.localIP();
        Serial.print("Endereco IP: ");
        Serial.println(ip);

        servidor.begin(); // inicia o servidor na porta 80

    }
}

void loop() {
    WiFiEspClient cliente = servidor.available(); // aguarda a conexao de clientes novos

    if (cliente) { // se aconteceu a conexao
        buf.init(); // initialize the circular buffer
        while ( cliente.connected() ) {
            if ( cliente.available() ) { // verifica se ainda existem bytes a serem recebidos do cliente
                char c = cliente.read(); // le um byte
                buf.push(c);    // adiciona o byte lido no buffer

                // um request http termina com dois \r\n consecutivos
                // quando atingirmos essa situacao, basta enviar a resposta
                if ( buf.endsWith("\r\n\r\n") ) {
                    enviaResposta(cliente);
                    break;
                }
            }
        }

        delay(10);

        // encerra a conexao
        cliente.stop();
    }
}

void enviaResposta(WiFiEspClient cliente) {
    cliente.print("HTTP/1.1 200 OK\r\n");
    cliente.print("Content-Type: text/html\r\n");
    cliente.print("Connection: close\r\n");
    cliente.print("\r\n");
    cliente.print("<!DOCTYPE HTML>\r\n");
    cliente.print("\r\n");
    cliente.print("
Smartfan
\r\n");
    cliente.print("
\r\n");
    cliente.print("Temperatura: ");
    cliente.print(analogRead(0) * (500.0/1023.0) );
    cliente.print("
\r\n");
    cliente.print("\r\n");
}

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


- basic test example

- basic test example

#include <SPI.h>

#include <BLEPeripheral.h>

#define BLE_REQ 10
#define BLE_RDY 2
#define BLE_RST 9

BLEPeripheral blePeripheral = BLEPeripheral(BLE_REQ, BLE_RDY, BLE_RST);

void setup() {
  Serial.begin(57600);

  blePeripheral.setLocalName("test");
  blePeripheral.setAdvertisedServiceUuid("B9407F30-F5F8-466E-AFF9-25556B57FE6D");

  blePeripheral.begin();

  Serial.println(F("BLE Peripheral"));
}

void loop() {
  blePeripheral.poll();
}

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


Update pumpkinDroid.ino

Update pumpkinDroid.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/estefanniegg/estefannieExplainsItAll.git/'


Initial Arduino firmware

Initial Arduino firmware

void setup {
 Serial.begin(9600);
}

void loop {
  Serial.println("HELLO");
  delay(1000);
}

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


Initial checkin with TaskManager example.  Adding DHT next

#include <PubSubClient.h>

#include <TaskManager.h>

void setup()
{
    Serial.begin(115200);
    delay(2000);

    // task interval is 1000[ms] and repeat forever
    Tasks.interval(1000, []{
        Serial.print("interval forever task: now = ");
        Serial.println(millis());
    });

    // task interval is 500[ms] and 10 times only
    Tasks.interval(500, 10, []{
        Serial.print("interval limited task: now = ");
        Serial.println(millis());
    });

    Serial.print("task start: now = ");
    Serial.println(millis());
}

void loop()
{
    Tasks.update();
}

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


Fix #60: add catena_hello_lora example

Fix #60: add catena_hello_lora example

/*

Module:  catena_hello_lora.ino

Function:
        Simple hello-world (and compile-test) app

Copyright notice and License:
        See LICENSE file accompanying this project.

Author:
        Terry Moore, MCCI Corporation	April 2018

*/

#include <Catena.h>
#include <Catena_Led.h>

using namespace McciCatena;

// declare the global object for the platform.
Catena gCatena;
Catena::LoRaWAN gLoRaWAN;

// declare the LED object
StatusLed gLed (Catena::PIN_STATUS_LED);

// declare the callback function.
Arduino_LoRaWAN::SendBufferCbFn uplinkDone;

bool gfSuccess;
bool gfTxStarted;
bool gfTxDone;

uint8_t uplinkBuffer[] = { /* port */ 0x10, 0xCA, 0xFE, 0xBA,0xBE };

void setup()
        {
        gCatena.begin();

        gCatena.SafePrintf("Hello, world (with LoRa)!\n");
        gCatena.SafePrintf("This is a basic demo program for the MCCI Catena-Arduino-Platform library.\n");
        gCatena.SafePrintf("Enter 'help' for a list of commands.\n");
        gCatena.SafePrintf("(remember to select 'Line Ending: Newline' at the bottom of the monitor window.)\n");

        gLed.begin();
        gCatena.registerObject(&gLed);
        gLed.Set(LedPattern::FastFlash);

        gLoRaWAN.begin(&gCatena);
        gCatena.registerObject(&gLoRaWAN);

        if (! gLoRaWAN.IsProvisioned())
                gCatena.SafePrintf("LoRaWAN not provisioned yet. Use the commands to set it up.\n");
        else
                {
                // send a confirmed uplink
                if (gLoRaWAN.SendBuffer(uplinkBuffer, sizeof(uplinkBuffer), uplinkDone, nullptr, true))
                        gfTxStarted = true;
                else
                        gCatena.SafePrintf("SendBuffer failed!\n");
                }
        }

void loop()
        {
        gCatena.poll();
        if (gfTxStarted && gfTxDone)
                {
                gfTxStarted = false;
                if (gfSuccess)
                        gCatena.SafePrintf("Transmit succeeded.\n");
                else
                        gCatena.SafePrintf("Message uplink failed!\n");
                }
        }

void uplinkDone(void *pCtx, bool fSuccess)
        {
        gfTxDone = true;
        gfSuccess = fSuccess;
        }

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


lcd code cleanup

lcd code cleanup

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/nathankoch/arduino-videosynth.git/'


Updated arduino code to stop motor or sheild overheating.

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


Create robot.ino

Create robot.ino

#include <SoftwareSerial.h>
#include <Motor.h>

int speed = 100;

bool button_control = false;

motorpins pins = {6, 9, 3, 5};

Motor motor(pins);

int led = 13;

SoftwareSerial bt(10, 11); //rx tx

float values = -100;
float yValues = -100;

int x_value = 0;
int y_value = 0;

int direction = 0;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  bt.begin(9600);
  pinMode(led, OUTPUT);
}

int getX(String value){
  String x = value.substring(1, value.indexOf(','));
  return x.toInt();
}

int getY(String value){
  String y = value.substring(value.indexOf(',') + 1, value.indexOf(')'));
  return y.toInt();
}

void loop() {
  // put your main code here, to run repeatedly:
  if (bt.available() > 0){
    //values = bt.parseFloat();
    //yValues = bt.parseFloat();

    //Serial.println("x values: " + String(values) + "\n y values: " + String(yValues));
    String compositeData = bt.readStringUntil('\n');

    Serial.println(compositeData);

    if (compositeData.startsWith("~")) {
      button_control = true;
      if (compositeData.equals("~FORWARD")) {Serial.println("fwd"); direction = 9000;}
      else if (compositeData.equals("~BACKWARD")) {Serial.println("back"); direction = 10000;}
      else if (compositeData.equals("~LEFT")) {Serial.println("left"); direction = 11000;}
      else if (compositeData.equals("~RIGHT")) {Serial.println("right") ; direction = 12000;}
      else if (compositeData.equals("~STOP")) {Serial.println("stop"); direction = 13000;}

    } else {
      button_control = false;
      x_value = getX(compositeData);
      y_value = getY(compositeData);
    }

    Serial.println("x: " +  String(x_value));
//    Serial.println(x);

    delay(10);
  }

  if (button_control == false){

  if (x_value > -8 && x_value < -3){

    Serial.println("FORWARD");
    motor.go(speed, speed, FORWARD);
  }

    else if (x_value > 3 && x_value < 8){
     Serial.println("BACKWARD");
    motor.go(speed, speed, BACKWARD);
  }

    else if (y_value > 3 && y_value < 8){
    Serial.println("LEFT");
    motor.go(0, speed, LEFT);
  }

  else if (y_value > -8 && y_value < -3){

    Serial.println("RIGHT");
    motor.go(speed, 0, RIGHT);
  }

  else {
    motor.go(0, 0, NOWHERE);
  }

  } else {

    if (direction == 9000){
      motor.go(speed, speed, FORWARD);
    } else if (direction == 10000){
      motor.go(speed, speed, BACKWARD);
    } else if (direction == 11000){

      motor.go(speed, speed, RIGHT);
    } else if (direction == 12000){
      motor.go(speed, speed, LEFT);
    } else if (direction == 13000){
      motor.go(0, 0, NOWHERE);
    }
  }

//  if (x_value > -8 && x_value < -3){
//    Serial.println("FORWARD");
//    motor.go(255, 255, FORWARD);
//  }
//
//  else if (x_value > 3 && x_value < 8){
//    Serial.println("BACKWARD");
//    motor.go(255, 255, BACKWARD);
//  }
//
//  else if (y_value > -8 && y_value < -3){
//    Serial.println("LEFT");
//    motor.go(0, 255, LEFT);
//  }
//
//  else if (y_value > 3 && y_value < 8){
//    Serial.println("RIGHT");
//    motor.go(255, 0, RIGHT);
//  }
//
//  else {
//    motor.go(0, 0, NOWHERE);
//  }

//  if (x_value > -10 && x_value < -3) {
//
//  }
//  else if (x_value > 3 && x_value < 10) {
//        Serial.println("BACKWARD");
//    motor.go(255, 255, BACKWARD);
//  }
//  else if (y_value > -10 && y_value < -3){
//        Serial.println("LEFT");
//    motor.go(255, 0, LEFT);
//  }
//  else if (y_value > 3 && y_value < 10){
//        Serial.println("RIGHT");
//    motor.go(0, 255, RIGHT);
//  }
//  else {
//        Serial.println("STOP");
//    motor.go(0, 0, NOWHERE);
//  }

  //if (values > -7) {digitalWrite(led, HIGH); motor.go(255, 255, FORWARD); }
  //else { digitalWrite(led, LOW); motor.go(0, 0, NOWHERE); }
}

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


First proposal

First proposal

There is a complete support for:
- communication over EthernetShield to a simple php page (POST)
- soil moisture sensors using some iron wires and electrolysis
- temperature sensors (LM35DZ)

#include <SPI.h>
#include <Ethernet.h>

/* definitions of the soil moisture pins - 2*digital + 3*analog */
#define voltageFlipPin1   6
#define voltageFlipPin2   7
// voltage flip to prevent the electrolitical defiance
#define sensorPinA        0
#define sensorPinB        1
#define sensorPinC        2

/* definitions of the temperature sensors pins - 3*analog */
#define temperaturePinA   3
#define temperaturePinB   4
#define temperaturePinC   5

/* soil moisture mapping - may change due to soil characteristics */
#define GREEN             500
#define YELLOW            800
/* soil moisture led alert - the led will be turned on if humidity is on "red" condition */
#define alertA            8
#define alertB            9
#define alertC            10

/* sleeping time for the EthernetShield and for the temperature retrieving */
#define ETHERNET_SETUP    5000
#define ETHERNET_CLIENT   1000
#define SENSOR_READ		    3000

/* other useful constants */
#define BAUD_RATE 		    9600
#define ANALOG_MOIST_MAP  1023
#define MOIST_FLIP_TIMER  3000
#define TEMP_CONVERSION   0.488

#define ETHERNET_DEBUG    false
#define SERVER_PORT       8080

/* initializing useful variables for moisture reading */
int moistA;
int moistB;
int moistC;

/* initializing useful variables for temperature reading */
float temperatureA;                  // final temperature reading
float temperatureB;
float temperatureC;
int analogTemperatureA;              // temperature retrieved from the sensor
int analogTemperatureB;
int analogTemperatureC;

/* initializing useful variables for client operations */
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,1,104);
IPAddress server(192,168,1,100);
EthernetClient client;

String data = "";
char inChar;

/* SETUP */
void setup() {
	Serial.begin(BAUD_RATE);

	// soil moisture sensor
	pinMode(voltageFlipPin1, OUTPUT);
  	pinMode(voltageFlipPin2, OUTPUT);
  	pinMode(sensorPinA     , INPUT);
  	pinMode(sensorPinB     , INPUT);
  	pinMode(sensorPinC     , INPUT);

  	// temperature sensor
  	pinMode(temperaturePinA, INPUT);
  	pinMode(temperaturePinB, INPUT);
  	pinMode(temperaturePinC, INPUT);

  	// EthernetShield setup delay
  	delay(ETHERNET_SETUP);
  	// EthernetShield setup
  	Ethernet.begin(mac, ip);
}

/* LOOP */
void loop() {
	// NB: all the cycle in a flip_timer range
	// resetting data
	data = "";

	// soil moisture polarity - electrolitical avoidance
	setSensorPolarity(true);

  // soil moisture
  moistA = analogRead(sensorPinA);
  moistB= analogRead(sensorPinB);
  moistC = analogRead(sensorPinC);

  data += "moistA=" + moistureValue(moistA, alertA)
    	 + "&moistB=" + moistureValue(moistB, alertB)
    	 + "&moistC=" + moistureValue(moistC, alertC);

  // temperature
  analogTemperatureA = analogRead(temperaturePinA);
  analogTemperatureB = analogRead(temperaturePinB);
  analogTemperatureC = analogRead(temperaturePinC);

  temperatureA = analogTemperatureA * TEMP_CONVERSION;
  temperatureB = analogTemperatureB * TEMP_CONVERSION;
  temperatureC = analogTemperatureC * TEMP_CONVERSION;

  data += "&tempA=" + String(temperatureA)
  	   + "&tempB=" + String(temperatureB)
  	   + "&tempC=" + String(temperatureC);

  // soil moisture polarity - electrolitical avoidance
  setSensorPolarity(false);

  // ethernet
  HTTP_POSTRequest(data);

  // serial monitoring
  Serial.println(String(moistA) + "\t\t"
  		         + String(moistB) + "\t\t"
  		         + String(moistC) + "\t\t");
  Serial.println(String(temperatureA) + "\t\t"
  		         + String(temperatureB) + "\t\t"
  		         + String(temperatureC) + "\t\t");
  Serial.println();
}

/* SENSOR POLARITY */
void setSensorPolarity(boolean flip){
  if (flip) {
    digitalWrite(voltageFlipPin1, HIGH);
    digitalWrite(voltageFlipPin2, LOW);
  }  else {
    digitalWrite(voltageFlipPin1, LOW);
    digitalWrite(voltageFlipPin2, HIGH);
  }
}

/* MOISTURE VALUE */
String moistureValue(int moist, int alertPin) {
	if (moist <= GREEN)
    // humidity value is "green"
		return "G";
	if (moist <= YELLOW)
    // humidity value is "yellow"
		return "Y";
	else {
    // humidity value is "red" -> turn on the led and feed the plant!
    digitalWrite(alertPin, HIGH);
		return "R";
  }
}

/* HTTP POST REQUEST */
void HTTP_POSTRequest(String params) {

  if (client.connect(server, SERVER_PORT)) {
    if (ETHERNET_DEBUG)
    	Serial.println("CONNECTION");

    client.println("POST /gamerland/data.php HTTP/1.1");
    client.println("Host: 192.168.1.100");
    client.println("User-Agent: arduino-ethernet");
    client.println("Content-Type: application/x-www-form-urlencoded");
    client.print("Content-Length: ");
    client.print(params.length());
    client.println();
    client.print(params);
  }

  delay(ETHERNET_CLIENT);
  while(client.available())
    {

      if (ETHERNET_DEBUG) {
      	Serial.write(inChar);
      	inChar = client.read();
      }
    }
  if (client.connected()) {
    client.stop();
  }
}

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


removing old project files

removing old project files

error: pathspec 'Robot' did not match any file(s) known to git
error: pathspec 'plotter' did not match any file(s) known to git
error: pathspec 'code/BoilerMake_2015/BoilerMake_2015.ino' did not match any file(s) known to git


Start

Start

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/DigitalesSED/ProyectoFinal.git/'


Agregar implementacion para medir distancias usando fc micros()

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/nverdicchio/soa-2017-bicicleta-inteligente.git/'


Added files via upload

Added files via upload

/*  Example program <2k for Arduino with GPS and OLED
 *
 *  This version is stripped down to fit on an Uno or a Nano,
 *  where Flash is 32k bytes. It uses about 20800 bytes and
 *  about 1850 bytes of dynamic memory.
 *
 *  The single serial line is used for the GPS.
 *  Don't connect the USB-cable and the GPS at the same time,
 *  as it may damage your board or the receiver
 *  First flash it, then discconnect the USB, then connect the GPS.
 *
 *  Again:
 *  This is a version for OLED and GPS.

 *  Serial is occupied. It cannot be used for debugging here.
 *  If you want to see the data on the screen of your computer,
 *  please use the version without OLED.
 *
 *  Finally:
 *  The GPS can not be attached until the Arduino is flashed,
 *  If you have another board, or no OLED attached, please modify
 *  this code accordingly.
 *  SoftSerial or Serial2, in case of a Mega or similar, are tested.
 */

#include <AmpleGPS.h>

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);

char displayString[14];     // for printing
char compassDir []= "NSEW";

AmpleGPS GPS;

// Set GPSECHO to 'false' to turn off echoing the GPS data to the Serial console
// Set to 'true' if you want to debug and listen to the raw GPS sentences
// #define GPSECHO  true

void setup()
{
    // connect at 115200 so we can read the GPS fast enough and echo without dropping chars
    // also spit it out
    Serial.begin(9600);
    delay(1000);

    GPS.callBack = updateGPSData;
    uint8_t newMode =
    //                        GPS_VIEW_UNPARSED |
    //                        GPS_PAUSED |
    //                        GPS_NEW_COORDS |
    //                        GPS_NEW_TIME |
    //                        GPS_UPDATE_SATS |
    GPS_COMPLETE_DATA;

    GPS.begin();            // GPS can start without parameter
    GPS.mode = newMode;

    display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3D (for the 128x64)

    // 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(2000);

    // Clear the buffer.
    display.clearDisplay();
    display.setTextColor(WHITE);
    display.setTextSize(1);

}

void loop()
{
    while (Serial.available())
    {
        char c = Serial.read();
        c = GPS.readSentence(c);
// replacement as one line of code
//        GPS.readSentence(Serial.read());

    }
}

void drawSphere(void) {
    int radius = display.height()/2 -1;
    int mid_y = radius;
    int mid_x = display.width() - radius -1;

    display.drawCircle(mid_x, mid_y, radius, WHITE);
    display.drawCircle(mid_x, mid_y, radius/2, WHITE);
    display.drawLine(mid_x, 0, mid_x, radius * 2, WHITE);
    display.drawLine(mid_x - radius, mid_y, mid_x + radius, mid_y, WHITE);
}

void drawSatellites(void) {
    if(GPS.satellitesCount > 0)
    {
        int skyRadius = display.height()/2 -1;
        int mid_y = skyRadius;
        int mid_x = display.width() - skyRadius -1;
        float markerSize = (float)skyRadius/4;

        GSV_Satellite *aSat = GPS.satellitesBuffer;
        for(int i = 0; i < GPS.satellitesCount; i++)
        {

            if(0 < aSat -> strength)
            {
                float rad = (float)skyRadius * cos((float)aSat -> elevation);
                float xPos = sin(aSat -> azimuth) * rad + mid_x;
                float yPos = cos(aSat -> azimuth) * rad + mid_y;
                rad = (float)(aSat -> strength)/66;
                //            rad = (float)(1 - (aSat -> strength)) + (rad * 2 * (aSat -> strength))* markerSize;

                display.fillCircle(xPos, yPos, rad, WHITE);
                //                display.setCursor(xPos, yPos);
                //                display.println(aSat -> number);
            }

            aSat++;
        }
    }
}

void writeData (void)
{
    display.setCursor(0,0);

    sprintf_P(displayString, PSTR("%02d.%02d.20%02d"),GPS.day, GPS.month, GPS.year);
    display.println(displayString);
    sprintf_P(displayString, PSTR("%02d:%02d:%02d\n"),GPS.hour, GPS.minute, GPS.seconds);
    display.println(displayString);

    //   sprintf(displayString, F("%4.1f m\n"),GPS.altitude);
    //   display.println(displayString);
    display.print(GPS.altitude);display.println(F(" m"));
    //   sprintf(displayString, "%3.2f knots\n",GPS.speedOnGround);
    display.print(GPS.speedOnGround);;display.println(F(" knots\n"));

    for(int i=0; i< 2; i++)
    {
        float coord = (0==i) ? GPS.latitudeDegrees : GPS.longitudeDegrees;
        int j = (coord < 0.0)? 1 : 0;
        j += i*2;
        char direction = *(compassDir + j);

        float degrees = floor(coord);
        float f_minutes = (coord - degrees) * 60;

        unsigned int deg = (unsigned int) degrees;
        unsigned int i_minutes = (unsigned int) floor(f_minutes);
        unsigned int secs = (unsigned int)round((f_minutes - (float)i_minutes)*1000);

        sprintf_P(displayString, PSTR("%c %02d %02d.%03d"),direction, deg, i_minutes, secs);

        display.println(displayString);

    }
}

int updateGPSData (uint8_t mode)
{
    boolean unparsed = false;
    if(GPS_VIEW_UNPARSED & mode || GPS_DO_NOT_PARSE & mode)
    {
        char *unparsedSentence = GPS.unparsedSentence;
        if(unparsedSentence)
        {
            unparsed = true;
        }
    }
    display.clearDisplay();

    writeData();        // draws the text string on the left side of the screen
    drawSphere();       // drwas the sheres
    drawSatellites();   // drwas the staelites as dots
    display.display();
    return 0;
}

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


added another example of s simple DCC Multifunction (Locomotive) decoder

// NMRA Dcc Multifunction Motor Decoder Demo
//
// Author: Alex Shepherd 2019-03-30
//
// This example requires these Arduino Libraries:
//
// 1) The NmraDcc Library from: http://mrrwa.org/download/
//
// These libraries can be found and installed via the Arduino IDE Library Manager
//
// This is a simple demo of how to drive and motor speed and direction using PWM and a motor H-Bridge
// It uses vStart and vHigh CV values to customise the PWM values to the motor response
// It also uses the Headling Function to drive 2 LEDs for Directional Headlights
// Apart from that there's nothing fancy like Lighting Effects or a function matrix or Speed Tables - its just the basics...
//

#include <NmraDcc.h>
// Uncomment any of the lines below to enable debug messages for different parts of the code
//#define DEBUG_FUNCTIONS
//#define DEBUG_SPEED
//#define DEBUG_PWM
//#define DEBUG_DCC_ACK
//#define DEBUG_DCC_MSG

#if defined(DEBUG_FUNCTIONS) or defined(DEBUG_SPEED) or defined(DEBUG_PWM) or defined(DEBUG_DCC_ACK) or defined(DEBUG_DCC_MSG)
#define DEBUG_PRINT
#endif

// This is the default DCC Address
#define DEFAULT_DECODER_ADDRESS 3

// This section defines the Arduino UNO Pins to use
#ifdef __AVR_ATmega328P__

#define DCC_PIN     2

#define LED_PIN_FWD 5
#define LED_PIN_REV 6
#define MOTOR_DIR_PIN 12
#define MOTOR_PWM_PIN 3

// This section defines the Arduino ATTiny85 Pins to use
#elif ARDUINO_AVR_ATTINYX5

#define DCC_PIN     2

#define LED_PIN_FWD 0
#define LED_PIN_REV 1
#define MOTOR_DIR_PIN 3
#define MOTOR_PWM_PIN 4

#else
#error "Unsupported CPU, you need to add another configuration section for your CPU"
#endif

// Some global state variables
uint8_t newLedState = 0;
uint8_t lastLedState = 0;

uint8_t newDirection = 0;
uint8_t lastDirection = 0;

uint8_t newSpeed = 0;
uint8_t lastSpeed = 0;
uint8_t numSpeedSteps = SPEED_STEP_128;

uint8_t vStart;
uint8_t vHigh;

// Structure for CV Values Table
struct CVPair
{
  uint16_t  CV;
  uint8_t   Value;
};

// CV Addresses we will be using
#define CV_VSTART  2
#define CV_VHIGH   5

// Default CV Values Table
CVPair FactoryDefaultCVs [] =
{
	// The CV Below defines the Short DCC Address
  {CV_MULTIFUNCTION_PRIMARY_ADDRESS, DEFAULT_DECODER_ADDRESS},

  // Three Step Speed Table
  {CV_VSTART, 120},
  {CV_VHIGH, 255},

  // These two CVs define the Long DCC Address
  {CV_MULTIFUNCTION_EXTENDED_ADDRESS_MSB, 0},
  {CV_MULTIFUNCTION_EXTENDED_ADDRESS_LSB, DEFAULT_DECODER_ADDRESS},

// ONLY uncomment 1 CV_29_CONFIG line below as approprate
//  {CV_29_CONFIG,                                      0}, // Short Address 14 Speed Steps
  {CV_29_CONFIG,                       CV29_F0_LOCATION}, // Short Address 28/128 Speed Steps
//  {CV_29_CONFIG, CV29_EXT_ADDRESSING | CV29_F0_LOCATION}, // Long  Address 28/128 Speed Steps
};

NmraDcc  Dcc ;

uint8_t FactoryDefaultCVIndex = 0;

// This call-back function is called when a CV Value changes so we can update CVs we're using
void notifyCVChange( uint16_t CV, uint8_t Value)
{
  switch(CV)
  {
    case CV_VSTART:
      vStart = Value;
      break;

    case CV_VHIGH:
      vHigh = Value;
      break;
  }
}

void notifyCVResetFactoryDefault()
{
  // Make FactoryDefaultCVIndex non-zero and equal to num CV's to be reset
  // to flag to the loop() function that a reset to Factory Defaults needs to be done
  FactoryDefaultCVIndex = sizeof(FactoryDefaultCVs)/sizeof(CVPair);
};

// This call-back function is called whenever we receive a DCC Speed packet for our address
void notifyDccSpeed( uint16_t Addr, DCC_ADDR_TYPE AddrType, uint8_t Speed, DCC_DIRECTION Dir, DCC_SPEED_STEPS SpeedSteps )
{
  #ifdef DEBUG_SPEED
  Serial.print("notifyDccSpeed: Addr: ");
  Serial.print(Addr,DEC);
  Serial.print( (AddrType == DCC_ADDR_SHORT) ? "-S" : "-L" );
  Serial.print(" Speed: ");
  Serial.print(Speed,DEC);
  Serial.print(" Steps: ");
  Serial.print(SpeedSteps,DEC);
  Serial.print(" Dir: ");
  Serial.println( (Dir == DCC_DIR_FWD) ? "Forward" : "Reverse" );
  #endif

  newDirection = Dir;
  newSpeed = Speed;
  numSpeedSteps = SpeedSteps;
};

// This call-back function is called whenever we receive a DCC Function packet for our address
void notifyDccFunc(uint16_t Addr, DCC_ADDR_TYPE AddrType, FN_GROUP FuncGrp, uint8_t FuncState)
{
  #ifdef DEBUG_FUNCTIONS
  Serial.print("notifyDccFunc: Addr: ");
  Serial.print(Addr,DEC);
  Serial.print( (AddrType == DCC_ADDR_SHORT) ? 'S' : 'L' );
  Serial.print("  Function Group: ");
  Serial.print(FuncGrp,DEC);
  #endif

  if(FuncGrp == FN_0_4)
  {
    newLedState = (FuncState & FN_BIT_00) ? 1 : 0;
    #ifdef DEBUG_FUNCTIONS
    Serial.print(" FN 0: ");
    Serial.print(newLedState);
    #endif
  }
  #ifdef DEBUG_FUNCTIONS
  Serial.println();
  #endif
}

// This call-back function is called whenever we receive a DCC Packet
#ifdef  DEBUG_DCC_MSG
void notifyDccMsg( DCC_MSG * Msg)
{
  Serial.print("notifyDccMsg: ") ;
  for(uint8_t i = 0; i < Msg->Size; i++)
  {
    Serial.print(Msg->Data[i], HEX);
    Serial.write(' ');
  }
  Serial.println();
}
#endif

// This call-back function is called by the NmraDcc library when a DCC ACK needs to be sent
// Calling this function should cause an increased 60ma current drain on the power supply for 6ms to ACK a CV Read
// So we will just turn the motor on for 8ms and then turn it off again.

void notifyCVAck(void)
{
  #ifdef DEBUG_DCC_ACK
  Serial.println("notifyCVAck") ;
  #endif

  digitalWrite(MOTOR_DIR_PIN, HIGH);
  digitalWrite(MOTOR_PWM_PIN, HIGH);

  delay( 8 );

  digitalWrite(MOTOR_DIR_PIN, LOW);
  digitalWrite(MOTOR_PWM_PIN, LOW);
}

void setup()
{
  #ifdef DEBUG_PRINT
  Serial.begin(115200);
  Serial.println("NMRA Dcc Multifunction Motor Decoder Demo");
  #endif

  // Setup the Pins for the Fwd/Rev LED for Function 0 Headlight
  pinMode(LED_PIN_FWD, OUTPUT);
  pinMode(LED_PIN_REV, OUTPUT);

  // Setup the Pins for the Motor H-Bridge Driver
  pinMode(MOTOR_DIR_PIN, OUTPUT);
  pinMode(MOTOR_PWM_PIN, OUTPUT);

  // Setup which External Interrupt, the Pin it's associated with that we're using and enable the Pull-Up
  Dcc.pin(DCC_PIN, 0);

  Dcc.init( MAN_ID_DIY, 10, FLAGS_MY_ADDRESS_ONLY | FLAGS_AUTO_FACTORY_DEFAULT, 0 );

  // Uncomment to force CV Reset to Factory Defaults
//  notifyCVResetFactoryDefault();

  // Read the current CV values for vStart and vHigh
  vStart = Dcc.getCV(CV_VSTART);
  vHigh = Dcc.getCV(CV_VHIGH);
}

void loop()
{
  // You MUST call the NmraDcc.process() method frequently from the Arduino loop() function for correct library operation
  Dcc.process();

  // Handle Speed changes
  if(lastSpeed != newSpeed)
  {
    lastSpeed = newSpeed;

    // Stop if speed = 0 or 1

    if(newSpeed <= 1)
      digitalWrite(MOTOR_PWM_PIN, LOW);

    // Calculate PWM value in the range 1..255
    else
    {
      uint8_t vScaleFactor;

      if((vHigh > 1) && (vHigh > vStart))
        vScaleFactor = vHigh - vStart;
      else
        vScaleFactor = 255 - vStart;

      uint8_t modSpeed = newSpeed - 1;
      uint8_t modSteps = numSpeedSteps - 1;

      uint8_t newPwm = (uint8_t) vStart + modSpeed * vScaleFactor / modSteps;

      #ifdef DEBUG_PWM
      Serial.print("New Speed: vStart: ");
      Serial.print(vStart);
      Serial.print(" vHigh: ");
      Serial.print(vHigh);
      Serial.print(" modSpeed: ");
      Serial.print(modSpeed);
      Serial.print(" vScaleFactor: ");
      Serial.print(vScaleFactor);
      Serial.print(" modSteps: ");
      Serial.print(modSteps);
      Serial.print(" newPwm: ");
      Serial.println(newPwm);
      #endif

      analogWrite(MOTOR_PWM_PIN, newPwm);
    }
  }

  // Handle Direction and Headlight changes
  if((lastDirection != newDirection) || (lastLedState != newLedState))
  {
    lastDirection = newDirection;
    lastLedState = newLedState;

    digitalWrite(MOTOR_DIR_PIN, newDirection);

    if(newLedState)
    {
      #ifdef DEBUG_FUNCTIONS
      Serial.println("LED On");
      #endif
      digitalWrite(LED_PIN_FWD, newDirection ? LOW : HIGH);
      digitalWrite(LED_PIN_REV, newDirection ? HIGH : LOW);
    }
    else
    {
      #ifdef DEBUG_FUNCTIONS
      Serial.println("LED Off");
      #endif
      digitalWrite(LED_PIN_FWD, LOW);
      digitalWrite(LED_PIN_REV, LOW);
    }
  }

  // Handle resetting CVs back to Factory Defaults
  if( FactoryDefaultCVIndex && Dcc.isSetCVReady())
  {
    FactoryDefaultCVIndex--; // Decrement first as initially it is the size of the array
    Dcc.setCV( FactoryDefaultCVs[FactoryDefaultCVIndex].CV, FactoryDefaultCVs[FactoryDefaultCVIndex].Value);
  }
}

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


we should return in case of errors

we should return in case of errors

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


initial commit

initial commit

#include "TaskScheduler.h"

int led1 = 12;
int led2 = 13;

void setup() {
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);

  scheduler.Begin(blink1, blink2);
  scheduler.SetTimers(250, 500);

}

void loop() {
  scheduler.Run();
}

void blink1() {
  digitalWrite(led1, !digitalRead(led1));
}

void blink2() {
  digitalWrite(led2, !digitalRead(led2));
}

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


Adding initial commit for the AnalogJoystickControl example. Untested but should work well.

/* Blue Robotics Example Code
-------------------------------

Title: Analog Joystick Control Example (Arduino)

Description: This code is an example of how to use the Blue Robotics thrusters
and ESCs to control a simple underwater vehicle. The code is designed to use
analog joysticks (http://www.parallax.com/product/27808) and three thrusters.
The thrusters are oriented with two pointing forward, one on the left and one
on the right side of the vehicle, as well as a vertical thruster.

The code is designed for the Arduino Uno board and can be compiled and
uploaded via the Arduino 1.0+ software.

-------------------------------
The MIT License (MIT)

Copyright (c) 2014 Blue Robotics Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-------------------------------*/

#include <Servo.h>

// Joystick Settings
static const int JS_CENTER_0 = 511; // Analog reading at center, 0-1023
static const int JS_CENTER_1 = 511;
static const int JS_CENTER_2 = 511;
static const int JS_RANGE_0 = 300; // Analog range, 0-1023
static const int JS_RANGE_1 = 300;
static const int JS_RANGE_2 = 300;
static const int JS_DIR_0 = 1; // +1 or -1
static const int JS_DIR_1 = 1;
static const int JS_DIR_2 = 1;

// ESC/Thruster Settings
static const int MAX_FWD_REV_THROTTLE = 400; // Value between 0-400
static const int MAX_TURN_THROTTLE = 400; // Value between 0-400
static const int MAX_VERTICAL_THROTTLE = 400; // Value between 0-400
static const int CENTER_THROTTLE = 1500;

// Arduino Pins
static const byte JS_ADC_0 = A0;
static const byte JS_ADC_1 = A1;
static const byte JS_ADC_2 = A2;
static const byte THRUSTER_LEFT = 9;
static const byte THRUSTER_RIGHT = 10;
static const byte THRUSTER_VERTICAL = 11;

// Servos
Servo thrusterLeft;
Servo thrusterRight;
Servo thrusterVertical;

void setup() {
	// Set up Arduino pins to send servo signals to ESCs
	thrusterLeft.attach(THRUSTER_LEFT);
	thrusterRight.attach(THRUSTER_RIGHT);
	thrusterVertical.attach(THRUSTER_VERTICAL);

	// Set output signal to 1500 microsecond pulse (stopped command)
	thrusterLeft.setMicroseconds(CENTER_THROTTLE);
	thrusterRight.setMicroseconds(CENTER_THROTTLE);
	thrusterVertical.setMicroseconds(CENTER_THROTTLE);

	// Delay to allow time for ESCs to initialize
	delay(1000);
}

void loop() {
	// Read the joysticks and use the Arduino "map" function to map the raw values
	// to the desired output commands.
	int forwardCommand  	=	map(analogRead(JS_ADC_0), // Read raw joystick value
		                       		JS_CENTER_0-JS_DIR_0*JS_RANGE_0, // Joystick low value
		                       		JS_CENTER_0+JS_DIR_0*JS_RANGE_0, // Joystick high value
		               		        -MAX_FWD_REV_THROTTLE, // Command low value
		                  		     MAX_FWD_REV_THROTTLE); // Command high value
	int turnCommand 	 		=	map(analogRead(JS_ADC_1), // Read raw joystick value
		                    			JS_CENTER_1-JS_DIR_1*JS_RANGE_1, // Joystick low value
		      			              JS_CENTER_1+JS_DIR_1*JS_RANGE_1, // Joystick high value
		            			        -MAX_TURN_THROTTLE, // Command low value
		                  			  MAX_TURN_THROTTLE); // Command high value
	int verticalCommand   =	map(analogRead(JS_ADC_2), // Read raw joystick value
		                      	  JS_CENTER_2-JS_DIR_2*JS_RANGE_2, // Joystick low value
		                      	  JS_CENTER_2+JS_DIR_2*JS_RANGE_2, // Joystick high value
		                      	  -MAX_VERTICAL_THROTTLE, // Command low value
		                      	  MAX_VERTICAL_THROTTLE); // Command high value

	// Combine the "stopped" command with forward, turn, and vertical and send
	// to the ESCs.
	thrusterLeft.setMicroseconds(CENTER_THROTTLE+forwardCommand+turnCommand);
	thrusterRight.setMicroseconds(CENTER_THROTTLE+forwardCommand-turnCommand);
	thrusterVertical.setMicroseconds(CENTER_THROTTLE+verticalCommand);

	// Delay 1/20th of a second. No need to update at super fast rates.
	delay(50);
}

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


Create am2315test.ino

Create am2315test.ino

#include <Wire.h>
#include <Adafruit_AM2315.h>

/***************************************************
  This is an example for the AM2315 Humidity + Temp sensor

  Designed specifically to work with the Adafruit BMP085 Breakout
  ----> https://www.adafruit.com/products/1293

  These displays use I2C to communicate, 2 pins are required to
  interface
  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, all text above must be included in any redistribution
 ****************************************************/

// Connect RED of the AM2315 sensor to 5.0V
// Connect BLACK to Ground
// Connect WHITE to i2c clock - on '168/'328 Arduino Uno/Duemilanove/etc thats Analog 5
// Connect YELLOW to i2c data - on '168/'328 Arduino Uno/Duemilanove/etc thats Analog 4

Adafruit_AM2315 am2315;

void setup() {
  Serial.begin(9600);
  Serial.println("AM2315 Test!");

  if (! am2315.begin()) {
     Serial.println("Sensor not found, check wiring & pullups!");
     while (1);
  }
}

void loop() {
  Serial.print("Hum: "); Serial.println(am2315.readHumidity());
  Serial.print("Temp: "); Serial.println(am2315.readTemperature());

  delay(1000);
}

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


add "assm1.ino"

add "assm1.ino"

/*
Arduino Sky Safari Mission #1

Software sketch version 1.0
Software information: https://github.com/anerdev/assm1/wiki/Software

made by: anerdev
https://github.com/anerdev/assm1
http://www.anerdev.net/assm1

LICENSE
- The "assm1.ino" is under "The MIT License (MIT)";
- The libraries are under the proprietary license.

*/

//General declaration
#include "Wire.h"
#include "OneWire.h"
#include "SoftwareSerial.h"
int counter;

//Declaration NTX2
#include "string.h"
#include "util/crc16.h"
#define ntx2 2
char rtty[100];

//Declaration DS18B20
#include "DallasTemperature.h"
#define ONE_WIRE_BUS 3
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature DS18B20(&oneWire);
float temperature;
int temperatureint;

//Declaration DHT22
#include "DHT22.h"
#define DHT22_PIN 4
DHT22 sensoreDHT22(DHT22_PIN);
float humidity;
int humidityint;

//Declaration Led
#define led 5

//Declaration Siren
#define siren 6

//Declaration SD
#include "SD.h"
#define sdpin 9
File sdfile;

//Declaration MPL115A2
#include "MPL115A2.h"
float pressure;
int pressureint;

//Declaration GSM/GPS
#include "SIM900.h"
#include "inetGSM.h"
#include "sms.h"
#include "gps.h"
InetGSM inet;
SMSGSM sms;
GPSGSM gps;
int altint;
char sendsms[50];
char lon[15];
char lat[15];
char alt[15];
char time[20];
char vel[15];
char stat;
boolean started=false;
char YY[5]; // Year
char MM[3]; // Month
char DD[3]; // Day
char hh[3]; // Hour
char mm[3]; // Minute
char ss[3]; // Second

void setup() {

  //Setting PIN
  pinMode(ntx2, OUTPUT); //NTX2
  pinMode(sdpin, OUTPUT); //SD Shield
  pinMode(led, OUTPUT); //Led
    digitalWrite(led, LOW);
  pinMode(siren, OUTPUT); //siren
    digitalWrite(siren, HIGH); // When is HIGH the piezo acoustic siren is poweroff, when is LOW the piezo acoustic siren is poweron

  //Start NTX2
  timeloop(30,1);

  //Test of NTX2 Transmission
  rtty_txstring("ASSM1 HW CHECK\n");

  //Led
  digitalWrite(led, HIGH);
  rtty_txstring("LED: ON (watch) ");
  digitalWrite(led, LOW);
  timeloop(3,0);

  //Siren
  digitalWrite(siren, LOW);
  rtty_txstring("SIREN: ON (listen) ");
  digitalWrite(siren, HIGH);
  timeloop(3,0);

  //MPL115A2
  MPL115A2.begin(); // Poweron MPL115A2
  MPL115A2.ReadSensor(); // Request the data
  MPL115A2.shutdown(); // Poweoff MPL115A2
  pressure = MPL115A2.GetPressure(); // Save the value of the pressure in the float "pressure"
  pressureint = MPL115A2.GetPressure(); // Save the value of the pressure in the integer "pressureint"
  if (pressureint == 69)  { // If the value is "69" the MPL115A2 is disconnect or doesn't work
    rtty_txstring("MPL115A2: ERROR\n");
  }
  else {
    rtty_txstring("MPL115A2: OK\n");
  };

  //DS18B20
  DS18B20.begin(); // Poweron DS18B20
  DS18B20.requestTemperatures(); // Request the data
  temperature = DS18B20.getTempCByIndex(0); // Save the value of the temperature in the float "temperature"
  temperatureint = DS18B20.getTempCByIndex(0); // Save the value of the temperature in the integer "temperatureint"
  if (temperatureint == -127) { // If the value is "-127" the MPL115A2 is disconnect or doesn't work
    rtty_txstring("DS18B20: ERROR\n");
  }
  else {
    rtty_txstring("DS18B20: OK\n");
  };

  //DHT22
  DHT22_ERROR_t DHT22errorCode; // Initialize the control variable
  delay(2000);
  DHT22errorCode = sensoreDHT22.readData(); // Save the errorCode variable
  switch(DHT22errorCode) {
    case DHT_ERROR_NONE: // Is all ok
      rtty_txstring("DHT22: OK\n");
      break;
    case DHT_ERROR_NOT_PRESENT: // Sensor disconnected
      rtty_txstring("DHT22: ERROR\n");
      break;
   };

  //SD Shield
  if (!SD.begin(4)) { // Initialize the SD communication
    rtty_txstring("SD: ERROR\n");
  }
  else {
    rtty_txstring("SD: OK\n");
  };

  // GSM/GPS Shield

  // GSM Module
  rtty_txstring("GSM (wait): ");
  if (gsm.begin(2400)) { // Initialize the Seral1 communication
    gsm.forceON(); // Force poweron the GSM module
    started=true;
    rtty_txstring("OK\n");
    sms.SendSMS("33333333", "GSM: OK\n"); // Send sms for test - Put you mobile number without the international prefix
  }
  else {
    rtty_txstring("ERROR\n");
  };

  // GPS Module
  rtty_txstring("GPS: ");
  if(started) {
    if(gps.attachGPS()) { // Initialize the GPS communication
      rtty_txstring("OK ");
    }
    else {
      rtty_txstring("ERROR");
    };

    timeloop(20,2);

    stat=gps.getStat();
    if(stat==1) {
      rtty_txstring("NOT FIXED\n"); // GPS doesn't work
    }
    else if(stat==0) {
      rtty_txstring("OFF\n"); // GPS have low power source
    }
    else if(stat==2) {
      rtty_txstring("2D\n"); // GPS receive only lat and lon
    }
    else if(stat==3) {
      rtty_txstring("3D\n"); // GPS receuve lat, lon and alt
    };

    timeloop(5,0);

    gps.getPar(lon,lat,alt,time,vel); // Get values from GPS

    sscanf(time,"%04s%02s%02s%02s%02s%02s",&YY,&MM,&DD,&hh,&mm,&ss); // Split the time char and save the data in the char variables - more info: https://gist.github.com/anerdev/b5bf703143ea1d0342e7

    // Open the data.csv file
    sdfile = SD.open("data.csv", FILE_WRITE); // Open the data.csv file

    if (sdfile) {

      sdfile.println();

      // Write the time and date of record
      sdfile.print("Start;");
      sdfile.print(hh);
      sdfile.print(":");
      sdfile.print(mm);
      sdfile.print(":");
      sdfile.print(ss);
      sdfile.print(";");
      sdfile.print(DD);
      sdfile.print("/");
      sdfile.print(MM);
      sdfile.print("/");
      sdfile.print(YY);
      sdfile.print(";");

      // Write the location of the record
      sdfile.print("From;");
      sdfile.print(lat);
      sdfile.print(";");
      sdfile.print(lon);
      sdfile.print(";");
      sdfile.print(alt);
      sdfile.print(";");

      sdfile.println();

      // Write the title of the columns
      sdfile.print("Counter;");
      sdfile.print("Time;");
      sdfile.print("Latitude;");
      sdfile.print("Longitude;");
      sdfile.print("Temperature;");
      sdfile.print("Humidity;");
      sdfile.print("Pressure;");

      sdfile.println();

      sdfile.close();

      snprintf(rtty, 100, "Start: %s:%s:%s - %s/%s/%s\n", hh, mm, ss, DD, MM, YY);  rtty_txstring (rtty);
      snprintf(rtty, 100, "From: %s - %s - %s\n\n", lat, lon, alt);  rtty_txstring (rtty);
    }
    else { //if SD failed open
      rtty_txstring("SD file: ERROR\n\n");
    };

  }; // End if(sterted)

}; // END Setup

void loop() {

  DS18B20.requestTemperatures(); // Read temperature from DS18B20
  temperature = DS18B20.getTempCByIndex(0); // Save the temperature value into "temperature" float variable
  temperatureint = DS18B20.getTempCByIndex(0); // Save the temperature value into "temperatureint" integer variable

  DHT22_ERROR_t DHT22errorCode; // Read humidity from DHT22
  DHT22errorCode = sensoreDHT22.readData(); // Read the error code of the humidity sensor from DHT22
  switch(DHT22errorCode)
  {
      case DHT_ERROR_NONE:
      humidity = sensoreDHT22.getHumidity(); // Save the humidity value into "humidity" float variable
      humidityint = sensoreDHT22.getHumidity(); // Save the humidity value into "humidityint" integer variable
      break;
  }

  MPL115A2.ReadSensor(); // Read pressure from MPL115A2
  MPL115A2.shutdown(); // Poweroff the sensor
  pressure = MPL115A2.GetPressure(); // Save the pressure value into "pressure" float variable
  pressureint = MPL115A2.GetPressure(); // Save the pressure value into "pressure" integer variable

  if(started) {
    if(gps.attachGPS()) { // Start GPS Module

      timeloop(15,1);
      stat=gps.getStat();
      gps.getPar(lon,lat,alt,time,vel);
      sscanf(time,"%04s%02s%02s%02s%02s%02s",&YY,&MM,&DD,&hh,&mm,&ss); // Split char "time" to hourse (hh), minute (mm), seconds (ss)

      altint = atoi(alt); // Convert char "alt" to int "altint"

      if (altint < 5000) { // If the altitude is < of 5000 meters, send sms
          snprintf(sendsms, 50, "%s - %s - %d", lat, lon, altint);
          sms.SendSMS("3339921212", sendsms);
          digitalWrite(siren, LOW); // Activate the siren allarm
      }
      else {
        digitalWrite(siren, HIGH); // If the altitude is > of 5000 meters, deactivae the siren allarm
      };

      sdfile = SD.open("data.csv", FILE_WRITE); // Save the variable on data.csv into the SD card

      if (sdfile) {

        sdfile.print(counter);      sdfile.print(";");
        sdfile.print(hh);           sdfile.print(":");
        sdfile.print(mm);           sdfile.print(":");
        sdfile.print(ss);           sdfile.print(";");
        sdfile.print(lat);          sdfile.print(";");
        sdfile.print(lon);          sdfile.print(";");
        sdfile.print(alt);          sdfile.print(";");
        sdfile.print(temperature);  sdfile.print(";");
        sdfile.print(humidity);     sdfile.print(";");
        sdfile.print(pressure);     sdfile.println(";");

        sdfile.close();

        // Send the radio string, like this: $$ASSM1,1,15:14:46,4444.444444,1111.111111,88,21,30,1000
        snprintf(rtty, 100, "$$ASSM1,%d,%s:%s:%s,%s,%s,%d,%s,%d,%d,%d", counter, hh, mm, ss, lat, lon, altint, vel, temperatureint, humidityint, pressureint);
        unsigned int CHECKSUM = gps_CRC16_checksum(rtty);
        char checksum_str[7];
        sprintf(checksum_str, "*%04X\n", CHECKSUM);
        strcat(rtty,checksum_str);
        rtty_txstring (rtty);

      }
        else { //if SD failed open
          // Send the radio string, like this: $$ASSM1,1,15:14:46,4444.444444,1111.111111,88,21,30,1000,ERROR
          snprintf(rtty, 100, "$$ASSM1,%d,%s:%s:%s,%s,%s,%d,%d,%d,%d,SD:ERROR", counter, hh, mm, ss, lat, lon, altint, temperatureint, humidityint, pressureint);
          unsigned int CHECKSUM = gps_CRC16_checksum(rtty);
          char checksum_str[7];
          sprintf(checksum_str, "*%04X\n", CHECKSUM);
          strcat(rtty,checksum_str);
          rtty_txstring (rtty);
      }; // END Save the variable on data.csv into the SD card

    }; // END if(gps.attachGPS())
  }; // END if(started)

  counter++; // Increase of 1 the counter value

}; // END void loop()

// Start GPS
void serialswread() {
  gsm.SimpleRead();
}
// END GPS

// Start Time loop
/*
timeloop(x,y);
x = time in second;
y = 0 for "new line", 1 for "tab", 2 for space.
*/
void timeloop(int timeloopvalue, int timeloopcr) {
  int timeloopcount;

  for (timeloopcount = 0; timeloopcount < timeloopvalue; timeloopcount++) {
    rtty_txstring("|");
    digitalWrite(led, HIGH);
    delay(500);
    digitalWrite(led, LOW);
    delay(500);
  };

  switch (timeloopcr) {
    case 0:
      rtty_txstring("\n");
      break;
    case 1:
      rtty_txstring("\t");
      break;
    case 2:
      rtty_txstring(" ");
      break;
   };
};
// END Time loop

//NTX2 Instruction set
// 50 baud, 7 bits ASCII 2 stop bits.
void rtty_txstring (char * string) {
    char c;
    c = *string++;

    while ( c != '\0') {
        rtty_txbyte (c);
        c = *string++;
    };
};

void rtty_txbyte (char c) {
    int i;
    rtty_txbit (0);

    for (i=0;i<7;i++) {
        if (c & 1) rtty_txbit(1);
        else rtty_txbit(0);
        c = c >> 1;
    };

    rtty_txbit (1);
    rtty_txbit (1);
};

void rtty_txbit (int bit) {
    if (bit) {
        digitalWrite(ntx2, HIGH);
    }
      else {
        digitalWrite(ntx2, LOW);
    };

    delayMicroseconds(10000);
    delayMicroseconds(10150);

}

uint16_t gps_CRC16_checksum (char *string) {
    size_t i;
    uint16_t crc;
    uint8_t c;

    crc = 0xFFFF;

    for (i = 2; i < strlen(string); i++) {
        c = string[i];
        crc = _crc_xmodem_update (crc, c);
    };

    return crc;
}
//END NTX2 Instruction set

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


Use office IPs

Use office IPs

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/lgramatikov/celeste.git/'


exemplo com PWM

exemplo com PWM

const int STEPS = 60;
const int POT_SCALE = 20;
const int LED = 11;
const int POT = A0;

int step = 0;

void setup() {
  pinMode(LED, OUTPUT);
}

void loop() {
  step++;
  step %= STEPS;
  float angle = 2 * PI * step / STEPS;
  analogWrite(LED, int(sin(angle)*127 + 127));
  delay(analogRead(POT)/POT_SCALE;
}

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


step direction on both motors …

step direction on both motors …


Fixed incorrect parameter.

Fixed incorrect parameter.

error: pathspec 'LCD' did not match any file(s) known to git
error: pathspec 'TFT' did not match any file(s) known to git
error: pathspec 'Screen/simple/simple.ino' did not match any file(s) known to git


Add spark-core main.

Add spark-core main.

#include "ds18b20/DS18B20.h"
#include "ds18b20/OneWire.h"

DS18B20 ds18b20 = DS18B20(D2);
char szInfo[64];

 // Setup
void setup() {
    Serial1.begin(9600);
}

 // Loop
void loop() {
    if(!ds18b20.search()){
        Serial1.println("No more addresses.");
        Serial1.println();
        ds18b20.resetsearch();
        delay(250);

        return;
    }

    float celsius = ds18b20.getTemperature();

    sprintf(szInfo, "{ temp: %2.2f, chip: \"%s\")", celsius, ds18b20.getChipName());

    Spark.publish("tmpinfo", szInfo);

    delay(1000);
}

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


Basic Serial Communication sketch

Basic Serial Communication sketch

/*
BASIC SERIAL COMMUNICATION
Carlos Castellanos | 2014 | ccastellanos.com

In order for the Arduino to communicate with your computer it needs to have some kind of standard or
protocol. Arduino can communicate over USB via what called "serial communication" or RS-232 This
allows us to send values (such as sensor readings) from the Arduino to the computer and back to the
Arduino (when a button is pressed, data from a web page, etc).

Once it's in your computer you can do all sorts of things wit the data
(e.g. map it sound, store it in a databse, etc)

You will need to open the Serial Monitor window in the Arduino IDE (located above) in order to
view the results

Suggestions:
- Keep a running count of the number of times the button is pressed and send it out the serial port
- Can you detect some type of patterns in the button data (e.g. how many  button press per second)
and send that out to the computer?
- Use/alter the code to read a photocell or control a relay.

 Refer to the Digital Read Serial tutorial for more:
 http://arduino.cc/en/Tutorial/DigitalReadSerial

 Also look at hte Serial Call and Response tutorial to learn how to both send & receive
 http://arduino.cc/en/Tutorial/SerialCallResponse

 Other relevant tutorials on Serial Communication
 http://arduino.cc/en/Tutorial/AnalogInOutSerial
 http://arduino.cc/en/Tutorial/PhysicalPixel
 http://arduino.cc/en/Tutorial/SerialEvent
 http://arduino.cc/en/Tutorial/SwitchCase2
 */

int buttonPin = 2;
int buttonState = 0; // 0/1 = on/off

void setup() {
  pinMode(buttonPin, INPUT);

  // start connection over USB; 9600 is the 'baud rate', or bits/second
  Serial.begin(9600);
}

void loop() {
  buttonState = digitalRead(buttonPin); // get the button state

  if (buttonState == HIGH) {
    Serial.println("HELLO!");  // send a new line with the word "HELLO!"
    delay(1);                  // waiting 1ms improves stability of your program

    Serial.print("Button: ");  // a label for the data (useful when sending multiple readings)
    Serial.print(buttonState); // send the button's state
    Serial.print("\n");        // a 'newline' character so we get a line break (allows to see the data better
  }
}

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


Victoria's boots

Victoria's boots

/* Juggle

By: Originally by Mark Kriegsman

Modified By: Andrew Tuline

Date: February 2015

Juggle just moves some balls back and forth. A single ball could be a Cylon effect. I've added several variables to this simple routine.

*/

#include "FastLED.h"

#if FASTLED_VERSION < 3001000
#error "Requires FastLED 3.1 or later; check github for latest code."
#endif

// Fixed definitions cannot change on the fly.
#define LED_DT     7
#define COLOR_ORDER GRB
#define LED_TYPE     WS2812B
#define NUM_LEDS    300

// Initialize changeable global variables.
uint8_t max_bright = 255;                                     // Overall brightness definition. It can be changed on the fly.

struct CRGB leds[NUM_LEDS];                                   // Initialize our LED array.

// Routine specific variables
uint8_t    numdots =   5;                                     // Number of dots in use.
uint8_t   faderate =   255;                                     // How long should the trails be. Very low value = longer trails.
uint8_t     hueinc =  32;                                     // Incremental change in hue between each dot.
uint8_t    thishue =   0;                                     // Starting hue.
uint8_t     curhue =   0;                                     // The current hue
uint8_t    thissat = 255;                                     // Saturation of the colour.
uint8_t thisbright = 255;                                     // How bright should the LED/display be.
uint8_t   basebeat =   0.0001;                                     // Higher = faster movement.

void setup() {
  delay(1000);                                                // Power-up safety delay or something like that.
  Serial.begin(57600);

    LEDS.addLeds<LED_TYPE, LED_DT, COLOR_ORDER>(leds, NUM_LEDS);    // Use this for WS2812B
//  LEDS.addLeds<LED_TYPE, LED_DT, LED_CK, COLOR_ORDER>(leds, NUM_LEDS);  // Use this for WS2801 or APA102

  FastLED.setBrightness(max_bright);
  set_max_power_in_volts_and_milliamps(5, 4000);               // FastLED power management set at 5V, 500mA.
} // setup()

void juggle() {                                               // Several colored dots, weaving in and out of sync with each other
  curhue = thishue;                                           // Reset the hue values.
  thishue=random8();
  fadeToBlackBy(leds, NUM_LEDS, faderate);
  for( int i = 0; i < numdots; i++) {
    leds[beatsin16(basebeat+i+numdots,0,NUM_LEDS)] += CHSV(curhue, thissat, thisbright);   //beat16 is a FastLED 3.1 function
    leds[beatsin16(basebeat+i+numdots,0,NUM_LEDS)+1] += CHSV(curhue, thissat, thisbright);   //beat16 is a FastLED 3.1 function
    leds[beatsin16(basebeat+i+numdots,0,NUM_LEDS)+2] += CHSV(curhue, thissat, thisbright);   //beat16 is a FastLED 3.1 function
    leds[beatsin16(basebeat+i+numdots,0,NUM_LEDS)+3] += CHSV(curhue, thissat, thisbright);   //beat16 is a FastLED 3.1 function
    curhue += hueinc;
  }
}

int hue = 0;
void sparkle() {
   fadeToBlackBy(leds, NUM_LEDS, 200);
  for (int i = 0; i < 4; i++) {
    int pos = random16(NUM_LEDS);
    leds[pos] = CHSV(hue + (pos / 10), 240, 255);
  }
  hue += 1;
  if (hue > 255) {
    hue = hue - 255;
  }
}

bool doSparkle = false;

void change() {
  if (doSparkle) {
    doSparkle = false;
  } else {
    doSparkle = true;
  }
}

void loop() {
  EVERY_N_MILLISECONDS(5000) {
    change();
  }
  EVERY_N_MILLISECONDS(60/1000) {
    if (doSparkle) {
      sparkle();
    } else {
      juggle();
    }
  }
  show_at_max_brightness_for_power();                         // Power managed display of LED's.
}

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


first arduino based example

first arduino based example

//based on https://github.com/telavivmakers/BMP180_Breakout_Arduino_Library/tree/master/examples/SFE_BMP180_example

#include <SFE_BMP180.h>
#include <Wire.h>

// You will need to create an SFE_BMP180 object, here called "pressure":

SFE_BMP180 pressure;

#define ALTITUDE 25.0 // Altitude of SparkFun's HQ in Boulder, CO. in meters

void setup()
{
  Serial.begin(9600);
  Serial.println("REBOOT");
  if (pressure.begin())
    Serial.println("BMP180 init success");
  else
  {
    // If you want sea-level-compensated pressure, as used in weather reports,
    // you will need to know the altitude at which your measurements are taken.
    // We're using a constant called ALTITUDE in this sketch:

    Serial.println();
    Serial.print("provided altitude: ");
    Serial.print(ALTITUDE, 0);
    Serial.print(" meters, ");
    Serial.print(ALTITUDE * 3.28084, 0);
    Serial.println(" feet");

    Serial.println("BMP180 init fail\n\n");
    while (1); // Pause forever.
  }
}

void loop()
{
  char status;
  double T, P, p0, a;

  // If you want to measure altitude, and not pressure, you will instead need
  // to provide a known baseline pressure. This is shown at the end of the sketch.

  // You must first get a temperature measurement to perform a pressure reading.

  // Start a temperature measurement:
  // If request is successful, the number of ms to wait is returned.
  // If request is unsuccessful, 0 is returned.

  status = pressure.startTemperature();
  if (status != 0)
  {
    // Wait for the measurement to complete:
    delay(status);

    // Retrieve the completed temperature measurement:
    // Note that the measurement is stored in the variable T.
    // Function returns 1 if successful, 0 if failure.

    status = pressure.getTemperature(T);
    if (status != 0)
    {
      // Print out the measurement:
      //Serial.print("temperature: ");
      //Serial.print(T, 2);
      //Serial.print(" deg C, ");

      // Start a pressure measurement:
      // The parameter is the oversampling setting, from 0 to 3 (highest res, longest wait).
      // If request is successful, the number of ms to wait is returned.
      // If request is unsuccessful, 0 is returned.

      status = pressure.startPressure(3);
      if (status != 0)
      {
        // Wait for the measurement to complete:
        delay(status);

        // Retrieve the completed pressure measurement:
        // Note that the measurement is stored in the variable P.
        // Note also that the function requires the previous temperature measurement (T).
        // (If temperature is stable, you can do one temperature measurement for a number of pressure measurements.)
        // Function returns 1 if successful, 0 if failure.

        status = pressure.getPressure(P, T);
        if (status != 0)
        {
          // Print out the measurement:
          //Serial.print("absolute pressure: ");
          Serial.println((P-1000)*100., 2);
          //Serial.print(" mb, ");
        //  Serial.print(P * 0.0295333727, 2);
         // Serial.println(" inHg");

          /*
            // The pressure sensor returns abolute pressure, which varies with altitude.
            // To remove the effects of altitude, use the sealevel function and your current altitude.
            // This number is commonly used in weather reports.
            // Parameters: P = absolute pressure in mb, ALTITUDE = current altitude in m.
            // Result: p0 = sea-level compensated pressure in mb

            p0 = pressure.sealevel(P, ALTITUDE); // we're at 1655 meters (Boulder, CO)
            Serial.print("relative (sea-level) pressure: ");
            Serial.print(p0, 2);
            Serial.print(" mb, ");
            Serial.print(p0 * 0.0295333727, 2);
            Serial.println(" inHg");

            // On the other hand, if you want to determine your altitude from the pressure reading,
            // use the altitude function along with a baseline pressure (sea-level or other).
            // Parameters: P = absolute pressure in mb, p0 = baseline pressure in mb.
            // Result: a = altitude in m.

            a = pressure.altitude(P, p0);
            Serial.print("computed altitude: ");
            Serial.print(a, 0);
            Serial.print(" meters, ");
            Serial.print(a * 3.28084, 0);
            Serial.println(" feet");
          */
        }
        else Serial.println("error retrieving pressure measurement\n");
      }
      else Serial.println("error starting pressure measurement\n");
    }
    else Serial.println("error retrieving temperature measurement\n");
  }
  else Serial.println("error starting temperature measurement\n");

  delay(100);  // Pause for 5 seconds.
}

/*
 * import processing.serial.*;

Serial myPort;        // The serial port
int xPos = 1;         // horizontal position of the graph

float fValue;
boolean newVal = false;

void setup () {
  size(400, 300);

  // List all the available serial ports
  println(Serial.list());
  myPort = new Serial(this, Serial.list()[0], 9600);
  // don't generate a serialEvent() unless you get a newline character:
  myPort.bufferUntil('\n');
  background(40);
  stroke(127, 34, 255);
}

void draw () {
  if (newVal) {
    line(xPos, height, xPos, height - fValue);
    if (++xPos >= width) {
      xPos = 0;
      background(0);
    }
    newVal = false;
  }
}

void serialEvent (Serial myPort) {
  String inString = myPort.readStringUntil('\n');
  if (inString != null) {
    inString = trim(inString);
    fValue = float(inString);
    fValue = map(fValue, 1500, 2000, 0, height);
    newVal = true;
  }
}
*/
 */

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


add example

add example

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


Modified SPI example for AT93C46

Modified SPI example for AT93C46

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/prpplague/Userspace-Arduino.git/'


Wifi Message Receiving Complete

Wifi Message Receiving Complete

Launchpad takes messages and interprets it. It can open valves and turn
them off after receiving a specific amount of pulses.

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


add test env

add test env

#include <OMManager.h>

void setup()
{
  Manipulator manipulator;

  manipulator.initManipulator(4, 4, 4, 1);
}

void loop()
{

}

error: pathspec 'arduino/opencr_arduino/opencr/libraries/OpenManipulator/example/OPM_for_Arduino/test_manager/test_manager.ino' did not match any file(s) known to git


initial version

initial version

auto mouse mover for Arduino Leonardo based on Longan Labs IRduino

// ######################################################################
//
// Leonardo_MouseMover.ino - auto mouse mover for Arduino Leonardo
// https://www.arduino.cc/en/Main/Arduino_BoardLeonardo
// based on Longan Labs IRduino https://www.longan-labs.cc/1040001.html
//
// IRduino library https://github.com/Longan-Labs/IRduino
// IRduino documentation https://docs.longan-labs.cc/1040001/
//
// Bart Spainhour <bart@tinkernauts.org>
//
// ######################################################################

// include libraries for mouse and irduino
#include <Mouse.h>
#include <IRDuino.h>
// also does a sub-include of Keyboard.h

// note: using irduino library for easy LED control.
// LEDs are wired to analog GPIO pins, so no PWM control of RGB
// options are Red, Green, Blue for each eye

// run this "setup()" section once at startup
void setup()
{
  // start mouse and IRDuino devices
  Mouse.begin();
  iRduino.begin();

  // flash green for good startup (250ms)
  iRduino.led(G1, 1);
  iRduino.led(G2, 1);
  delay(250);
  iRduino.releaseAll();
  iRduino.all_led_off();

  // pause one second after init
  // this can be longer for the oh-sh1t moment
  // if you need to unplug
  delay(1000);
}

// loop contents of "loop()" section forever
void loop()
{
  // vars for mouse movements
  int xMovePixels = 5; // consider some elaborate randomization?
  int yMovePixels = 5; // or trig functions?
  int responseDelay = 2; // de-bounce for mouse output

  // how long to cycle delay
  // 30 seconds default
  int pauseDelay = 30000;

  // to-do: put the green-flash into a loop
  delay(pauseDelay); // 1 of 3 default 30 seconds

  // flash green (500ms)
  iRduino.led(G1, 1);
  iRduino.led(G2, 1);
  delay(500);
  iRduino.all_led_off();

  delay(pauseDelay); // 2 of 3 default 30 seconds

  // flash green (500ms)
  iRduino.led(G1, 1);
  iRduino.led(G2, 1);
  delay(500);
  iRduino.all_led_off();

  delay(pauseDelay); // 3 of 3 default 30 seconds

  // flash green (500ms)
  iRduino.led(G1, 1);
  iRduino.led(G2, 1);
  delay(500);
  iRduino.all_led_off();
  delay(500);

  // to-do: put this into a loop
  // warning before mouse move
  // flash red 1 of 3 (500ms)
  iRduino.led(R1, 1);
  iRduino.led(R2, 1);
  delay(500);
  iRduino.all_led_off();
  delay(500);

  // flash red 2 of 3 (500ms)
  iRduino.led(R1, 1);
  iRduino.led(R2, 1);
  delay(500);
  iRduino.all_led_off();
  delay(500);

  // flash red 3 of 3 (500ms)
  iRduino.led(R1, 1);
  iRduino.led(R2, 1);
  delay(500);
  iRduino.all_led_off();
  delay(500);

  // release keyboard just in case
  iRduino.releaseAll();
  // move mouse
  Mouse.move(xMovePixels, yMovePixels, 0); // (x, y, wheel)
  delay(responseDelay);

  // flash blue for all clear
  iRduino.led(B1, 1);
  iRduino.led(B2, 1);
  delay(500);
  iRduino.all_led_off();
  iRduino.releaseAll();

  // return to top of loop section
}

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