This sketch decode nmea messages on serial port and send orders to sabertooth card controlling motors.

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

--- Arduino/Simple/src/src.ino
+++ Arduino/Simple/src/src.ino
@@ -0,0 +1,164 @@
+// Copyright (c) 2013 Nautilabs
+// https://github.com/baptistelabat/robokite
+
+// This file used SoftwareSerial example (Copyright (c) 2012 Dimension Engineering LLC)
+// for Sabertooth http://www.dimensionengineering.com/software/SabertoothSimplifiedArduinoLibrary/html/index.html
+// See license.txt in the Sabertooth arduino library for license details.
+//
+// The selector 1 3 5 6 have to be on on.
+//
+// Using example in http://code.google.com/p/arduino-pinchangeint/wiki/Usage
+// Parts of code taken from http://playground.arduino.cc/Main/RotaryEncoders J.Carter(of Earth)
+//
+//
+// Connections
+// Arduino          Sabertooth
+// 8 (soft RX)      TX
+
+
+#include <SoftwareSerial.h>
+#include <SabertoothSimplified.h>
+#include <TinyGPS++.h>
+#include <PID_v1.h>
+
+const int ledPin = 13;
+
+String inputString = "";         // a string to hold incoming data
+boolean stringComplete = false;  // whether the string is complete
+
+//Note: NOT_A_PIN (0) was previously used for RX which is not used, but this was causing problems
+SoftwareSerial SWSerial(10, 8); // RX, TX. RX on no pin (unused), TX on pin 8 (to S1).
+SabertoothSimplified ST(SWSerial); // Use SWSerial as the serial port.
+int power1, power2;
+
+TinyGPSPlus nmea;
+// O stands for Opensource, R for Robokite
+// The index is the place of the field in the NMEA message
+TinyGPSCustom feedback_request      (nmea, "ORFBR", 1);  // Feedback request
+TinyGPSCustom pwm1     (nmea, "ORPW1", 1);  // Dimentionless voltage setpoint (Pulse Width Modulation) for Sabertooth output 1
+TinyGPSCustom pwm2     (nmea, "ORPW2", 1);  // Dimentionless voltage setpoint (Pulse Width Modulation) for Sabertooth output 2
+TinyGPSCustom setpos1  (nmea, "ORSP1", 1);  // Position setpoint for Sabertooth output 1
+TinyGPSCustom setpos2  (nmea, "ORSP2", 1);  // Position setpoint for Sabertooth output 2
+boolean isFeedbackRequested = false;
+
+// Define Variables we'll be connecting to
+double Setpoint1, Input1, Output1;
+double Setpoint2, Input2, Output2;
+// Specify the links and initial tuning parameters (Kp, Ki, Kd)
+PID myPID1(&Input1, &Output1, &Setpoint1, 1, 0, 0, DIRECT);
+PID myPID2(&Input2, &Output2, &Setpoint2, 1, 0, 0, DIRECT);
+
+void setup()
+{
+  // Initialize software serial communication with Sabertooth
+  SWSerial.begin(9600);
+
+  // Initialize serial communications with computer
+  Serial.begin(57600);
+
+  // reserve bytes for the inputString:
+  inputString.reserve(200);
+}
+
+/*
+  SerialEvent occurs whenever a new data comes in the
+ hardware serial RX.  This routine is run between each
+ time loop() runs, so using delay inside loop can delay
+ response.  Multiple bytes of data may be available.
+ */
+void serialEvent()
+{
+  while (Serial.available()) {
+    // get the new byte:
+    char inChar = (char)Serial.read();
+    // add it to the inputString:
+    inputString += inChar;
+    // if the incoming character is a newline, set a flag
+    // so the main loop can do something about it:
+    if (inChar == '\n') {
+      stringComplete = true;
+    }
+  }
+}
+
+void loop()
+{
+   processSerialInput();
+   computeFeedback();
+   sendFeedback();
+   computeOrder();
+   sendOrder();
+   delay(10);
+}
+
+void processSerialInput()
+{
+  // print the string when a newline arrives:
+  if (stringComplete)
+  {
+    //Serial.println(inputString);
+    char ctab[inputString.length()+1];
+    inputString.toCharArray(ctab, sizeof(ctab));
+    char *gpsStream = ctab;
+
+    while (*gpsStream)
+    {
+      if (nmea.encode(*gpsStream++))
+      {
+        if (pwm1.isUpdated())
+        {
+          myPID1.SetMode(MANUAL);
+        }
+        if (pwm2.isUpdated())
+        {
+          myPID2.SetMode(MANUAL);
+        }
+        if (feedback_request.isUpdated())
+        {
+          isFeedbackRequested = true;
+          digitalWrite(ledPin, HIGH);
+        }
+
+      }
+    }
+    // clear the string:
+    inputString = "";
+    stringComplete = false;
+  }
+}
+
+void computeFeedback()
+{
+}
+
+void sendFeedback()
+{
+  if (isFeedbackRequested)
+  {
+    Serial.print((power1+127)*4);
+    Serial.print(", ");
+    Serial.print((power2+127)*4);
+    Serial.println("");
+    isFeedbackRequested = false;
+  }
+}
+
+void computeOrder()
+{
+  if (myPID1.GetMode() == MANUAL)
+  {
+    power1 = atoi(pwm1.value());
+  }
+  if (myPID2.GetMode() == MANUAL)
+  {
+    power2 = atoi(pwm2.value());
+  }
+}
+
+void sendOrder()
+{
+  // Order in the range -127/127
+   ST.motor(1, power1);
+   ST.motor(2, power2);
+}
+


add comments

add comments

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/yamaha-webmusic/ymf825board.git/'


added untested current reading code

added untested current reading code

error: pathspec 'rov/sensors/axuillarymicros/current/current.ino' did not match any file(s) known to git

--- rov/sensors/axuillarymicros/current/current.ino
+++ rov/sensors/axuillarymicros/current/current.ino
@@ -0,0 +1,54 @@
+// import No Design 2013 MCP3008 library
+
+#include <MCP3008.h>
+#include <Wire.h>
+
+//define pin connections
+
+#define CS_PIN1 7
+#define CS_PIN2 8
+#define CS_PIN3 12
+#define CS_PIN4 13
+//consider using ICSP instead of these pins
+
+#define CLOCK_PIN 9
+#define MOSI_PIN 11
+#define MISO_PIN 10
+
+MCP3008 adc1(CLOCK_PIN, MOSI_PIN, MISO_PIN, CS_PIN1);
+MCP3008 adc2(CLOCK_PIN, MOSI_PIN, MISO_PIN, CS_PIN2);
+MCP3008 adc3(CLOCK_PIN, MOSI_PIN, MISO_PIN, CS_PIN3);
+MCP3008 adc4(CLOCK_PIN, MOSI_PIN, MISO_PIN, CS_PIN4);
+
+void setup() {
+  // put your setup code here, to run once:
+  Wire.begin(0x76);
+  Wire.onRequest(writeData);
+}
+
+void loop() {
+
+}
+
+void writeData() {
+  for (int i=0; i < 8; i++) {
+    int val1 = adc1.readADC(i);
+    Wire.write(val1);
+  }
+
+  for (int i = 0; i < 8; i++) {
+    int val2 = adc2.readADC(i);
+    Wire.write(val2);
+  }
+
+  for (int i = 0; i < 8; i++) {
+    int val3 = adc3.readADC(i);
+    Wire.write(val3);
+  }
+
+  for (int i = 0; i < 8; i++) {
+    int val4 = adc4.readADC(i);
+    Wire.write(val4);
+  }
+}
+


Write temperature sensor data to SD card.

error: pathspec 'Calibration/Write' did not match any file(s) known to git
error: pathspec 'Temperature' did not match any file(s) known to git
error: pathspec 'Data' did not match any file(s) known to git
error: pathspec 'to' did not match any file(s) known to git
error: pathspec 'SD' did not match any file(s) known to git
error: pathspec 'Card/tempToSDCard/tempToSDCard.ino' did not match any file(s) known to git


Working with Rotary Encoder

Working with Rotary Encoder

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/rniemand/ArduinoProjects.git/'


Rename the method.

Rename the method.

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/maleagha/PaceClock.git/'


hmm, this look ahead looks reasonable

hmm, this look ahead looks reasonable

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


Arduino：loop()に待ち時間追加

Arduino：loop()に待ち時間追加

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/ics-creative/160125_arduino_ESP-WROOM-02_v2.git/'


Add Arduino Code

Add Arduino Code

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

--- arduino_neopixel/arduino_neopixel.ino
+++ arduino_neopixel/arduino_neopixel.ino
@@ -0,0 +1,59 @@
+// Skateboard Neopixel Program
+// Controls 2*26 sets of neopixels on the bottom of my DIY electric skateboard
+// Used an Arduino Nano to control the lights to save logic level conversion on the Pi Zero and worrying about task management
+// Wiimote 'A' button triggers Pi that then triggers Arduino inputs that then turn on the lights
+
+#include <Adafruit_NeoPixel.h>
+#ifdef __AVR__
+  #include <avr/power.h>
+#endif
+
+#define PIN 6
+#define BUTTON 7
+#define INTERRUPT_PIN 2
+
+Adafruit_NeoPixel strip = Adafruit_NeoPixel(26, PIN, NEO_GRB + NEO_KHZ800);
+
+void setup() {
+  strip.begin();
+  strip.show();
+  pinMode(BUTTON, INPUT);
+  attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), ISRturn_off, RISING);
+  }
+
+void loop() {
+  int value = 0;
+  int but_val = 0;
+  blank();
+  while (true){
+    but_val = digitalRead(BUTTON);
+    if (but_val == 1){
+        sequence();
+      }
+    if (but_val == 0){
+        blank();
+      }
+    }
+  }
+
+void ISRturn_off(){
+  blank();
+  }
+
+void colorWipe(uint32_t c, uint8_t wait) {
+  for(uint16_t i=0; i<strip.numPixels(); i++) {
+    strip.setPixelColor(i, c);
+    strip.show();
+    delay(wait);
+    }
+  }
+
+void sequence(){
+  colorWipe(strip.Color(255, 0, 0), 25);
+  colorWipe(strip.Color(0, 255, 0), 25);
+  colorWipe(strip.Color(0, 0, 255), 25);
+  }
+
+void blank(){
+  colorWipe(strip.Color(0, 0, 0), 25);
+  }


Svetelny theremin PhotpBuzzer

Svetelny theremin PhotpBuzzer

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

--- PhotoBuzzer/PhotoBuzzer.ino
+++ PhotoBuzzer/PhotoBuzzer.ino
@@ -0,0 +1,17 @@
+#define BUZZER 6
+
+int pause = 1;
+
+void setup() {
+  pinMode(BUZZER, OUTPUT);
+}
+
+void loop() {
+    pause = analogRead(A1);
+    digitalWrite(BUZZER, HIGH);   // Přitáhneme membránu reproduktoru
+    delayMicroseconds(pause);     // počkáme
+    digitalWrite(BUZZER, LOW);    // pustíme membránu
+    delayMicroseconds(pause);     // zase počkáme
+                                  //a jedeme dokola...
+}
+


MPU6050 Raw data reading

MPU6050 Raw data reading

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

--- MPU6050_raw/MPU6050_raw.ino
+++ MPU6050_raw/MPU6050_raw.ino
@@ -0,0 +1,209 @@
+// I2C device class (I2Cdev) demonstration Arduino sketch for MPU6050 class
+// 10/7/2011 by Jeff Rowberg <jeff@rowberg.net>
+// Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib
+//
+// Changelog:
+//      2013-05-08 - added multiple output formats
+//                 - added seamless Fastwire support
+//      2011-10-07 - initial release
+
+/* ============================================
+I2Cdev device library code is placed under the MIT license
+Copyright (c) 2011 Jeff Rowberg
+
+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.
+===============================================
+*/
+
+// I2Cdev and MPU6050 must be installed as libraries, or else the .cpp/.h files
+// for both classes must be in the include path of your project
+#include "I2Cdev.h"
+#include "MPU6050.h"
+
+// Arduino Wire library is required if I2Cdev I2CDEV_ARDUINO_WIRE implementation
+// is used in I2Cdev.h
+#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
+    #include "Wire.h"
+#endif
+
+// class default I2C address is 0x68
+// specific I2C addresses may be passed as a parameter here
+// AD0 low = 0x68 (default for InvenSense evaluation board)
+// AD0 high = 0x69
+MPU6050 accelgyro;
+//MPU6050 accelgyro(0x69); // <-- use for AD0 high
+
+int16_t ax, ay, az;
+int16_t gx, gy, gz;
+
+
+
+// uncomment "OUTPUT_READABLE_ACCELGYRO" if you want to see a tab-separated
+// list of the accel X/Y/Z and then gyro X/Y/Z values in decimal. Easy to read,
+// not so easy to parse, and slow(er) over UART.
+#define OUTPUT_READABLE_ACCELGYRO
+
+// uncomment "OUTPUT_BINARY_ACCELGYRO" to send all 6 axes of data as 16-bit
+// binary, one right after the other. This is very fast (as fast as possible
+// without compression or data loss), and easy to parse, but impossible to read
+// for a human.
+//#define OUTPUT_BINARY_ACCELGYRO
+
+
+#define LED_PIN 13
+bool blinkState = false;
+
+void setup() {
+    // join I2C bus (I2Cdev library doesn't do this automatically)
+    #if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
+        Wire.begin();
+    #elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE
+        Fastwire::setup(400, true);
+    #endif
+
+    // initialize serial communication
+    // (38400 chosen because it works as well at 8MHz as it does at 16MHz, but
+    // it's really up to you depending on your project)
+    Serial.begin(38400);
+
+    // initialize device
+  //  Serial.println("Initializing I2C devices...");
+    //accelgyro.initialize();
+
+    accelgyro.setClockSource(MPU6050_CLOCK_PLL_XGYRO);
+
+    // set the gyroscope for full-scale range
+    setFullScaleGyroRange(MPU6050_GYRO_FS_250);
+
+    // set scale range for accelerometer
+    setFullScaleAccelRange(MPU6050_ACCEL_FS_2);
+
+    // Digital Low Pass filter setting for bandwidth 5 delay 19.0 ms
+    // check register details datasheet of MPU6050 page 13
+    accelgyro.setDLPFMode(MPU6050_DLPF_BW_5);
+
+    // set scale range for gyroscope
+    accelgyro.setSleepEnabled(false);
+
+    delay(2000);
+
+    // Digital Low Pass filter
+    accelgyro.setDLPFMode(MPU6050_DLPF_BW_5);
+
+    // verify connection
+    //Serial.println("Testing device connections...");
+    //Serial.println(accelgyro.testConnection() ? "MPU6050 connection successful" : "MPU6050 connection failed");
+
+    // use the code below to change accel/gyro offset values
+    accelgyro.setXGyroOffset(70);
+    accelgyro.setYGyroOffset(-36);
+    accelgyro.setZGyroOffset(5);
+    accelgyro.setXAccelOffset(-6250);
+    accelgyro.setYAccelOffset(-2647);
+    accelgyro.setZAccelOffset(15);
+
+//
+//    accelgyro.setXGyroOffset(220);
+//    accelgyro.setYGyroOffset(76);
+//    accelgyro.setZGyroOffset(-85);
+//    accelgyro.setXAccelOffset(1432);
+//    accelgyro.setYAccelOffset(-2647);
+//    accelgyro.setZAccelOffset(1788); // 1688 factory default for my test chip
+
+
+
+    /*
+    Serial.println("Updating internal sensor offsets...");
+    // -76	-2359	1688	0	0	0
+    Serial.print(accelgyro.getXAccelOffset()); Serial.print("\t"); // -76
+    Serial.print(accelgyro.getYAccelOffset()); Serial.print("\t"); // -2359
+    Serial.print(accelgyro.getZAccelOffset()); Serial.print("\t"); // 1688
+    Serial.print(accelgyro.getXGyroOffset()); Serial.print("\t"); // 0
+    Serial.print(accelgyro.getYGyroOffset()); Serial.print("\t"); // 0
+    Serial.print(accelgyro.getZGyroOffset()); Serial.print("\t"); // 0
+    Serial.print("\n");
+    accelgyro.setXGyroOffset(220);
+    accelgyro.setYGyroOffset(76);
+    accelgyro.setZGyroOffset(-85);
+    Serial.print(accelgyro.getXAccelOffset()); Serial.print("\t"); // -76
+    Serial.print(accelgyro.getYAccelOffset()); Serial.print("\t"); // -2359
+    Serial.print(accelgyro.getZAccelOffset()); Serial.print("\t"); // 1688
+    Serial.print(accelgyro.getXGyroOffset()); Serial.print("\t"); // 0
+    Serial.print(accelgyro.getYGyroOffset()); Serial.print("\t"); // 0
+    Serial.print(accelgyro.getZGyroOffset()); Serial.print("\t"); // 0
+    Serial.print("\n");
+    */
+
+    // configure Arduino LED for
+    pinMode(LED_PIN, OUTPUT);
+    digitalWrite(LED_PIN, HIGH);
+  //Serial.begin(38400);
+  Serial.print('a');
+  char a = 'b';
+  while (a != 'a'){
+    a = Serial.read();
+  }
+}
+
+int mode = 1;
+
+
+void loop() {
+    // read raw accel/gyro measurements from device
+    accelgyro.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
+
+    // these methods (and a few others) are also available
+    //accelgyro.getAcceleration(&ax, &ay, &az);
+    //accelgyro.getRotation(&gx, &gy, &gz);
+
+    #ifdef OUTPUT_READABLE_ACCELGYRO
+      if (Serial.available() > 0 ){
+        mode = Serial.read();
+        if( mode == 'R'){
+          Serial.println(ax);
+        Serial.println(ay);
+        Serial.println(az);
+        }
+      }
+      delay(20);
+
+        // display tab-separated accel/gyro x/y/z values
+//        Serial.print("a/g:\t");
+//        Serial.println(ax); //Serial.print("\t");
+        //Serial.print(ay); Serial.print("\t");
+        //Serial.print(az); Serial.print("\t");
+        //Serial.print(gx); Serial.print("\t");
+        //Serial.print(gy); Serial.print("\t");
+        //Serial.println(gz);
+    #endif
+
+    #ifdef OUTPUT_BINARY_ACCELGYRO
+        Serial.print(ax); Serial.print("\n");
+        Serial.write((uint8_t)(ax >> 8)); Serial.write((uint8_t)(ax & 0xFF));
+        Serial.write((uint8_t)(ay >> 8)); Serial.write((uint8_t)(ay & 0xFF));
+        Serial.write((uint8_t)(az >> 8)); Serial.write((uint8_t)(az & 0xFF));
+        Serial.write((uint8_t)(gx >> 8)); Serial.write((uint8_t)(gx & 0xFF));
+        Serial.write((uint8_t)(gy >> 8)); Serial.write((uint8_t)(gy & 0xFF));
+        Serial.write((uint8_t)(gz >> 8)); Serial.write((uint8_t)(gz & 0xFF));
+    #endif
+
+    // blink LED to indicate activity
+ //   blinkState = !blinkState;
+ //   digitalWrite(LED_PIN, blinkState);
+}


Initial Commit of File

Initial Commit of File

Rover pause switch code.

error: pathspec 'electrical/Pause' did not match any file(s) known to git
error: pathspec 'Switch/pause_switch.ino' did not match any file(s) known to git


Add NeoPixel

Add NeoPixel

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

--- examples/_3001_NeoPixel/_3001_NeoPixel.ino
+++ examples/_3001_NeoPixel/_3001_NeoPixel.ino
@@ -0,0 +1,52 @@
+#include "ESPert.h"
+
+ESPert espert;
+
+void setup()
+{
+ 	espert.init();
+ 	espert.oled.init();
+ 	espert.neopixel.init();
+}
+
+void loop()
+{
+	espert.neopixel.rainbow();
+ 	delay(1000);
+	espert.neopixel.setColor(ColorRed);
+	delay(1000);
+	espert.neopixel.setColor(ColorGreen);
+	delay(1000);
+	espert.neopixel.setColor(ColorBlue);
+	delay(1000);
+
+	/*
+		-- Predefine Color --
+		ColorRed     0xFF0000
+		ColorGreen   0x008000
+		ColorBlue    0x0000FF
+		ColorCyan    0x00FFFF
+		ColorPurple  0x800080
+		ColorGray    0x808080
+		ColorBrown   0xA52A2A
+		ColorSilver  0xC0C0C0
+		ColorViolet  0xEE82EE
+		ColorPink    0xFFC0CB
+		ColorGold    0xFFD700
+		ColorYellow  0xFFFF00
+		ColorWhite   0xFFFFFF
+	*/
+	espert.neopixel.setPixelColor(0,ColorRed);
+	espert.neopixel.setPixelColor(1,ColorGreen);
+	espert.neopixel.setPixelColor(2,ColorBlue);
+	espert.neopixel.setPixelColor(3,ColorCyan);
+	espert.neopixel.setPixelColor(4,ColorPurple);
+	espert.neopixel.setPixelColor(5,ColorGray);
+	espert.neopixel.setPixelColor(6,ColorBrown);
+	espert.neopixel.setPixelColor(7,ColorGold);
+	espert.neopixel.show();
+	delay(1000);
+
+	espert.neopixel.off();
+	delay(1000);
+}


Better display style

Better display style

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/TFTLibraries/TFT.git/'


add remote

add remote

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


add sample1

add sample1


Create explorer_robot_v2.ino

Create explorer_robot_v2.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/firatozz/Explorer-Robot.git/'


random pronouns aww yeah

random pronouns aww yeah

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


added simple example for basic use

added simple example for basic use

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

--- examples/simple_example.ino
+++ examples/simple_example.ino
@@ -0,0 +1,25 @@
+/*
+ * GPSTZTest.ino
+ *
+ * Created: 8/16/2014 1:23:20 PM
+ * Author: Ryan
+ */
+#include <GPSTimeZoneLookup.h>
+
+GPSTimeZoneLookup myGPSTZ(33.9612895,-111.3380113);
+
+void setup()
+{
+    Serial.begin(115200);
+    Serial.print("lat/long: ");
+    Serial.print(myGPSTZ.latitude);
+    Serial.print(myGPSTZ.longitude);
+    Serial.print(" GMT Offset: ");
+    Serial.print(myGPSTZ.GMTOffset);
+    Serial.print(" Implements DST: ");
+    Serial.println(myGPSTZ.implementsDST);
+}
+
+void loop()
+{
+}


Correct text in test-128x64ZW

Correct text in test-128x64ZW

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


Add MQTT example

Add MQTT example

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

--- ArduinoMqttExample/ArduinoMqttExample.ino
+++ ArduinoMqttExample/ArduinoMqttExample.ino
@@ -0,0 +1,36 @@
+#include "mjson.h" // Sketch -> Add File -> Add mjson.h
+
+// Gets called by the RPC engine to send a reply frame
+static int wfn(const char *frame, int frame_len, void *privdata) {
+  return Serial.write(frame, frame_len);
+}
+
+// Catch MQTT messages on topic "ccm/led", and switch LED on/off
+static void mqtt_cb(struct jsonrpc_request *r) {
+  char topic[100] = "", message[100] = "";
+  mjson_get_string(r->params, r->params_len, "$.topic", topic, sizeof(topic));
+  mjson_get_string(r->params, r->params_len, "$.message", message, sizeof(message));
+  if (strcmp(topic, "ccm/led") == 0) pinMode(LED_BUILTIN, atoi(message));
+}
+
+void setup() {
+  Serial.begin(115200);          // Init serial comms
+	pinMode(LED_BUILTIN, OUTPUT);  // Configure LED pin
+  jsonrpc_init(NULL, NULL);      // Init JSON-RPC engine
+  jsonrpc_export("MQTT.Message", mqtt_cb, NULL); // Set MQTT message callback
+  jsonrpc_call(wfn, NULL,
+               "{\"method\":\"MQTT.Sub\",\"params\":{\"topic\":\"ccm/#\"}}");
+}
+
+void loop() {
+  while (Serial.available() > 0) jsonrpc_process_byte(Serial.read(), wfn, NULL);
+
+  // Publish to MQTT periodically
+  static unsigned long old, now;
+  now = millis();
+  if (old > now || old + 5000 < now) {
+    old = now;
+    jsonrpc_call(wfn, NULL, "{\"method\":\"MQTT.Pub\",\"params\":"
+                 "{\"topic\":\"ccm/data\",\"message\":%lu}}", now);
+  }
+}


Create test02.ino

Create test02.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/TEAMarg/ATMlib.git/'


use analog

use analog

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/larsdouweschuitema/minor-webofthings.git/'


Added a protoshield version with 6x12 display

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

--- protoshield/mwsv3/mwsv3.ino
+++ protoshield/mwsv3/mwsv3.ino
@@ -0,0 +1,321 @@
+//SD card
+//http://blog.oscarliang.net/sd-card-arduino/
+#include <SD.h>
+File sd;
+
+//Gyro/compass SDA=A4 SCL=A5
+//Removed as BMP180 sensor already uses the pins
+#include <Wire.h>
+//#include <HMC5883L.h>
+//HMC5883L compass;
+
+//Light garage lamp Sensor on A1
+//int lightPin1 = 1;
+
+// DS18B20 Temperature (+ 4.7kOhm resistor on VCC 5V)
+#include <OneWire.h>
+#include <DallasTemperature.h>
+// Data wire is plugged into pin 9 on the Arduino
+// pin 10 is needed for the SD card SS
+#define ONE_WIRE_BUS 9
+// Setup a oneWire instance to communicate with any OneWire devices
+// (not just Maxim/Dallas temperature ICs)
+OneWire oneWire(ONE_WIRE_BUS);
+// Pass our oneWire reference to Dallas Temperature.
+DallasTemperature sensors(&oneWire);
+
+//Light Sensor on A0 (+1KOhm resistor on GND)
+int lightPin = 0;
+
+//BMP180 SDA=A4, SDC=A5
+#include <Wire.h>
+#include <Adafruit_Sensor.h>
+#include <Adafruit_BMP085_U.h>
+Adafruit_BMP085_Unified bmp = Adafruit_BMP085_Unified(10085);
+
+//DHT11 data pin=Digital 6
+#include <dht11.h>
+dht11 DHT11;
+#define DHT11PIN 6
+
+#include <LiquidCrystal.h>
+LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
+
+void setup()
+{
+  Serial.begin(115200);
+  //Gyro/Compass
+  Wire.begin();
+  //compass = HMC5883L();
+  //compass.SetScale(1.3);
+  //compass.SetMeasurementMode(Measurement_Continuous);
+  //Start Dallas D18B20
+  sensors.begin();
+  //Start the BMP180 Pressure sensor
+  bmp.begin();
+  // set up the LCD's number of columns and rows:
+  lcd.begin(16, 2);
+  // Print a message to the LCD.
+  lcd.print("IWMI MWS v3");
+  lcd.setCursor(0, 1);
+  lcd.print("Starting Sensors");
+  delay(2000);
+}
+
+void loop()
+{
+  sd = SD.open("test.txt", FILE_WRITE);
+  //Gyro/Compass
+  //MagnetometerRaw raw = compass.ReadRawAxis();
+  //MagnetometerScaled scaled = compass.ReadScaledAxis();
+  //float xHeading = atan2(scaled.YAxis, scaled.XAxis);
+  //float yHeading = atan2(scaled.ZAxis, scaled.XAxis);
+  //float zHeading = atan2(scaled.ZAxis, scaled.YAxis);
+  //if(xHeading < 0) xHeading += 2*PI;
+  //if(xHeading > 2*PI) xHeading -= 2*PI;
+  //if(yHeading < 0) yHeading += 2*PI;
+  //if(yHeading > 2*PI) yHeading -= 2*PI;
+  //if(zHeading < 0) zHeading += 2*PI;
+  //if(zHeading > 2*PI) zHeading -= 2*PI;
+  //float xDegrees = xHeading * 180/M_PI;
+  //float yDegrees = yHeading * 180/M_PI;
+  //float zDegrees = zHeading * 180/M_PI;
+  //Serial.print(xDegrees);
+  //Serial.print(",");
+  //Serial.print(yDegrees);
+  //Serial.print(",");
+  //Serial.print(zDegrees);
+  //Serial.println(";");
+  //delay(100);
+  //lcd.clear();
+  //lcd.setCursor(0, 0);
+  //lcd.print("X Y Z Heading");
+  //lcd.setCursor(0, 1);
+  //lcd.print(xDegrees);
+  //lcd.print(",");
+  //lcd.print(yDegrees);
+  //lcd.print(",");
+  //lcd.print(zDegrees);
+  //lcd.print(" Deg");
+  //delay(2000);
+
+  // Read Light Garage Lamp Sensor
+  //lcd.clear();
+  //lcd.setCursor(0, 0);
+  //lcd.print("Light Sensor 1 ");
+  //lcd.setCursor(0, 1);
+  //lcd.print((float) analogRead(lightPin1));
+  //lcd.print(" -");
+  //delay(2000);
+
+  //Get temperature from Dallas D18B20
+  sensors.requestTemperatures();
+  float dallasT = sensors.getTempCByIndex(0);// Why "byIndex"?
+  // You can have more than one IC on the same bus.
+  // 0 refers to the first IC on the wire
+  Serial.print(dallasT);
+  lcd.clear();
+  lcd.setCursor(0, 0);
+  lcd.print("Temperature D12B80 ");
+  lcd.setCursor(0, 1);
+  lcd.print(dallasT);
+  lcd.print(" C");
+  sd.print(dallasT);
+  sd.print(",");
+  delay(2000);
+
+  // Read Light Sensor
+  //1023/2=511 = night = 1KOhms (equal to paired resistor)
+  lcd.clear();
+  lcd.setCursor(0, 0);
+  lcd.print("Light Sensor ");
+  lcd.setCursor(0, 1);
+  lcd.print((float) analogRead(lightPin)/511.0*1000);
+  lcd.print(" Ohms");
+  delay(2000);
+
+  /* Get a new sensor event */
+  sensors_event_t event;
+  bmp.getEvent(&event);
+  /* Display the results (barometric pressure is measure in hPa) */
+  if (event.pressure)
+  {
+    /* Display atmospheric pressure in hPa */
+    Serial.print("Pressure: ");
+    Serial.print(event.pressure);
+    Serial.println(" hPa");
+    lcd.clear();
+    lcd.setCursor(0, 0);
+    lcd.print("Pressure ");
+    lcd.setCursor(0, 1);
+    lcd.print(event.pressure);
+    lcd.print(" hPa");
+    sd.print(event.pressure);
+    sd.print(",");
+    delay(2000);
+  }
+  else
+  {
+    Serial.println("BMP180 Sensor error");
+  }
+
+  int chk = DHT11.read(DHT11PIN);
+
+  Serial.print("Read sensor: ");
+  switch (chk)
+  {
+  case DHTLIB_OK:
+    Serial.println("DHT11 OK");
+    break;
+  case DHTLIB_ERROR_CHECKSUM:
+    Serial.println("DHT11 Checksum error");
+    break;
+  case DHTLIB_ERROR_TIMEOUT:
+    Serial.println("DHT11 Time out error");
+    break;
+  default:
+    Serial.println("DHT11 Unknown error");
+    break;
+  }
+
+  Serial.print("Humidity (%): ");
+  Serial.println((float)DHT11.humidity, 2);
+  lcd.clear();
+  // set the cursor to column 0, line 1
+  // (note: line 1 is the second row, since counting begins with 0):
+  lcd.setCursor(0, 0);
+  lcd.print("Humidity ");
+  lcd.setCursor(0, 1);
+  lcd.print((float)DHT11.humidity,2);
+  lcd.print(" %");
+  sd.print((float)DHT11.humidity,2);
+  sd.print(",");
+  delay(2000);
+  Serial.print("Temperature (°C): ");
+  Serial.println((float)DHT11.temperature, 2);
+  lcd.clear();
+  lcd.setCursor(0, 0);
+  lcd.print("Temperature ");
+  lcd.setCursor(0, 1);
+  lcd.print((float)DHT11.temperature, 2);
+  lcd.print(" C");
+  sd.print((float)DHT11.temperature, 2);
+  sd.print(",");
+  delay(2000);
+
+  Serial.print("Temperature (°F): ");
+  Serial.println(Fahrenheit(DHT11.temperature), 2);
+  lcd.clear();
+  lcd.setCursor(0, 0);
+  lcd.print("Temperature ");
+  lcd.setCursor(0, 1);
+  lcd.print(Fahrenheit(DHT11.temperature), 2);
+  lcd.print(" F");
+  delay(2000);
+  Serial.print("Temperature (°K): ");
+  Serial.println(Kelvin(DHT11.temperature), 2);
+  lcd.clear();
+  lcd.setCursor(0, 0);
+  lcd.print("Temperature ");
+  lcd.setCursor(0, 1);
+  lcd.print(Kelvin(DHT11.temperature), 2);
+  lcd.print(" K");
+  //lcd.print("hello, world!");
+  delay(2000);
+  Serial.print("Dew Point (°C): ");
+  Serial.println(dewPoint(DHT11.temperature, DHT11.humidity));
+  lcd.clear();
+  lcd.setCursor(0, 0);
+  lcd.print("Dew Point (NOAA)");
+  lcd.setCursor(0, 1);
+  lcd.print(dewPoint(DHT11.temperature, DHT11.humidity));
+  lcd.print(" C");
+  //lcd.print("hello, world!");
+  delay(2000);
+  Serial.print("Dew PointFast (°C): ");
+  Serial.println(dewPointFast(DHT11.temperature, DHT11.humidity));
+  lcd.clear();
+  lcd.setCursor(0, 0);
+  lcd.print("Dew Point (Fast)");
+  lcd.setCursor(0, 1);
+  lcd.print(dewPointFast(DHT11.temperature, DHT11.humidity));
+  lcd.print(" C");
+
+  //close SD card file
+  sd.print("\n");
+  sd.close();
+
+  delay(2000);
+
+}
+
+
+//float getHeading(){
+//  //Get the reading from the HMC5883L and calculate the heading
+//  MagnetometerScaled scaled = compass.ReadScaledAxis(); //scaled values from compass.
+//  float heading = atan2(scaled.YAxis, scaled.XAxis);
+//
+//  // Correct for when signs are reversed.
+//  if(heading < 0) heading += 2*PI;
+//  if(heading > 2*PI) heading -= 2*PI;
+//
+//  return heading * RAD_TO_DEG; //radians to degrees
+//}
+
+
+//Celsius to Fahrenheit conversion
+double Fahrenheit(double celsius)
+{
+  return 1.8 * celsius + 32;
+}
+
+// fast integer version with rounding
+//int Celcius2Fahrenheit(int celcius)
+//{
+//  return (celsius * 18 + 5)/10 + 32;
+//}
+
+
+//Celsius to Kelvin conversion
+double Kelvin(double celsius)
+{
+  return celsius + 273.15;
+}
+
+// dewPoint function NOAA
+// reference (1) : http://wahiduddin.net/calc/density_algorithms.htm
+// reference (2) : http://www.colorado.edu/geography/weather_station/Geog_site/about.htm
+//
+double dewPoint(double celsius, double humidity)
+{
+  // (1) Saturation Vapor Pressure = ESGG(T)
+  double RATIO = 373.15 / (273.15 + celsius);
+  double RHS = -7.90298 * (RATIO - 1);
+  RHS += 5.02808 * log10(RATIO);
+  RHS += -1.3816e-7 * (pow(10, (11.344 * (1 - 1/RATIO ))) - 1) ;
+  RHS += 8.1328e-3 * (pow(10, (-3.49149 * (RATIO - 1))) - 1) ;
+  RHS += log10(1013.246);
+
+  // factor -3 is to adjust units - Vapor Pressure SVP * humidity
+  double VP = pow(10, RHS - 3) * humidity;
+
+  // (2) DEWPOINT = F(Vapor Pressure)
+  double T = log(VP/0.61078);   // temp var
+  return (241.88 * T) / (17.558 - T);
+}
+
+// delta max = 0.6544 wrt dewPoint()
+// 6.9 x faster than dewPoint()
+// reference: http://en.wikipedia.org/wiki/Dew_point
+double dewPointFast(double celsius, double humidity)
+{
+  double a = 17.271;
+  double b = 237.7;
+  double temp = (a * celsius) / (b + celsius) + log(humidity*0.01);
+  double Td = (b * temp) / (a - temp);
+  return Td;
+}
+
+
+
+


Added Arduino code

Added Arduino code

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

--- Motor_v2.ino
+++ Motor_v2.ino
@@ -0,0 +1,67 @@
+#include <CurieBLE.h>
+#define MOTOR_PIN 6
+
+BLEPeripheral blePeripheral;
+BLEService motorService = BLEService("5762");
+
+// switchCharacteristic controls motor's on/off state
+BLECharCharacteristic switchCharacteristic =
+  BLECharCharacteristic("5763", BLERead | BLEWrite);
+BLEDescriptor switchDescriptor = BLEDescriptor("2901", "Switch");
+
+// speedCharacteristic controls the motor's speed
+BLECharCharacteristic speedCharacteristic =
+  BLECharCharacteristic("5764", BLERead | BLEWrite);
+BLEDescriptor speedDescriptor = BLEDescriptor("2901", "Speed");
+
+void setup() {
+  Serial.begin(9600);
+
+  pinMode(MOTOR_PIN, OUTPUT);
+
+  blePeripheral.setLocalName("Bluetooth Motor");
+  blePeripheral.setDeviceName("Bluetooth Motor");
+  blePeripheral.setAdvertisedServiceUuid(motorService.uuid());
+
+  blePeripheral.addAttribute(motorService);
+
+  blePeripheral.addAttribute(switchCharacteristic);
+  blePeripheral.addAttribute(switchDescriptor);
+
+  blePeripheral.addAttribute(speedCharacteristic);
+  blePeripheral.addAttribute(speedDescriptor);
+
+  switchCharacteristic.setEventHandler(BLEWritten, switchCharacteristicWritten);
+  speedCharacteristic.setEventHandler(BLEWritten, speedCharacteristicWritten);
+
+
+  blePeripheral.begin();
+
+  while (! Serial); // Busy wait until serial ready
+  Serial.println(F("Bluetooth Motor Ready!\n"));
+}
+
+void loop() {
+  blePeripheral.poll();
+}
+
+void switchCharacteristicWritten(BLECentral& central, BLECharacteristic& characteristic) {
+  Serial.print(F("Characteristic event, written: "));
+
+  if (switchCharacteristic.value()) {
+    Serial.println(F("Motor on!"));
+    digitalWrite(MOTOR_PIN, HIGH);
+  } else {
+    Serial.println(F("Motor off!"));
+    digitalWrite(MOTOR_PIN, LOW);
+  }
+}
+
+void speedCharacteristicWritten(BLECentral& central, BLECharacteristic& characteristic) {
+  Serial.println(F("HERE"));
+  Serial.print(F("Motor set to: "));
+  Serial.println(speedCharacteristic.value());
+
+  analogWrite(MOTOR_PIN, speedCharacteristic.value());
+}
+


New example to use with Arduino Compatible Device client model

For use with the Arduino Compatible Device client model device type in portals.exosite.com.

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

--- examples/ExoEthernetGettingStarted.ino
+++ examples/ExoEthernetGettingStarted.ino
@@ -0,0 +1,207 @@
+//*****************************************************************************
+//
+// ExoEthernetGettingStarted - This example is can be used with the "Arduino
+//   Compatible Device" device available in portals.exosite.com.  It uses
+//   provisioning to activate with Exosite instead of using a hard-coded CIK.
+//   By default it does two things, one is reads the A0 analog   value and sends
+//   this to a dataport called A0.  It also makes a read request for a dataport
+//   called D2 and sets the Digital pin 2 to 1 or 0 based on that value.
+//
+//   Developers can feel free to create new dataports to read and write to on the
+//   Exosite platform for their device's client and also then add the code below to
+//   interact with those dataports.
+//
+//   Tested with Arduino UNO SMD R2 and Arduino Ethernet Shield
+//
+// Copyright (c) 2015 Exosite LLC.  All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+
+//  * Redistributions of source code must retain the above copyright notice,
+//    this list of conditions and the following disclaimer.
+//  * Redistributions in binary form must reproduce the above copyright
+//    notice, this list of conditions and the following disclaimer in the
+//    documentation and/or other materials provided with the distribution.
+//  * Neither the name of Exosite LLC nor the names of its contributors may
+//    be used to endorse or promote products derived from this software
+//    without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
+// NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
+// NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
+// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
+// DAMAGES, FOR ANY REASON WHATSOEVER.
+//
+//*****************************************************************************
+
+#include <SPI.h>
+#include <EEPROM.h>
+#include <Ethernet.h>
+#include <Exosite.h>
+
+/*==============================================================================
+* Configuration Variables
+*
+* Change these variables to your own settings.
+*=============================================================================*/
+byte macData[] = { 0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 };        // <-- Fill in your Ethernet shield's MAC address here.
+
+// Enter your Unique Identifier code here
+char unique_id[11] = "0024A3D07D"; // <-- Generated from Adding your device in portals.exosite.com
+
+// Use these variables to customize what datasources are read and written to.
+const String readString = "d2";
+
+// Number of Errors before we try a reprovision.
+const unsigned char reprovisionAfter = 3;
+/*==============================================================================
+* End of Configuration Variables
+*=============================================================================*/
+
+unsigned char errorCount = reprovisionAfter;  // Force Provision On First Loop
+char macString[18];  // Used to store a formatted version of the MAC Address
+
+class EthernetClient client;
+Exosite exosite(&client);
+
+String tempString;
+int index = 0;
+int lastIndex = -1;
+
+
+/*==============================================================================
+* setup
+*
+* Arduino setup function.
+*=============================================================================*/
+void setup() {
+  Serial.begin(115200);
+  Serial.println(F("Boot"));
+
+  pinMode(2, OUTPUT); //assume using D2 as output to control remotely
+
+  // Create MAC Address String in the format FF:FF:FF:FF:FF:FF
+  snprintf(macString, 18, "%02X:%02X:%02X:%02X:%02X:%02X",
+           macData[0], macData[1], macData[2], macData[3], macData[4], macData[5]);
+
+  Serial.println(F("setting up Ethernet Connection..."));
+
+  // Setup Ethernet Connection
+  if (Ethernet.begin(macData) == 0) {
+    Serial.println("Failed to configure Ethernet using DHCP");
+    // no point in carrying on, so do nothing forevermore:
+    for (;;)
+      ;
+  }
+
+
+  // Print Some Useful Info
+  Serial.print(F("MAC Address: "));
+  Serial.println(macString);
+
+  Serial.print(F("IP Address: "));
+  Serial.println(Ethernet.localIP());
+
+  Serial.print(F("Unique Identifier: "));
+  Serial.println(unique_id);
+
+  Serial.print(F("Exo Arduino Lib Ver: "));
+  Serial.println(ACTIVATOR_VERSION);
+}
+
+/*==============================================================================
+* loop
+*
+* Arduino loop function.
+*=============================================================================*/
+void loop() {
+  String writeString = "";
+  String returnString = "";
+  index = 0;
+  lastIndex = -1;
+
+
+  // Check if we should reprovision.
+  if (errorCount >= reprovisionAfter) {
+    if (exosite.provision("exosite", "ard-generic", unique_id)) {
+      errorCount = 0;
+    }
+  }
+    String uptime_str = String(millis()/1000);
+  writeString += "uptime="+ uptime_str;
+
+  //GET ANALOG 0 VALUE
+  //get average of a number of readings
+  int avgValue=0;
+  int readings = 0;
+  unsigned long avgTot = 0;
+  int avgCnt = 0;
+
+  while(readings<10)
+  {
+    avgTot += analogRead(A0);
+    avgCnt += 1;
+    avgValue = avgTot/avgCnt;
+    readings++;
+  }
+  String analog0_str = String(avgValue);
+  writeString += "&a0="+ analog0_str;
+
+
+  //Make Write and Read request to Exosite Platform
+  Serial.println("---- Do Read and Write ----");
+  if (exosite.writeRead(writeString, readString, returnString)) {
+    Serial.println("OK");
+    Serial.print("Returned: ");
+    Serial.println(returnString);
+    Serial.println("Parse out dataport alias values");
+    errorCount = 0;
+    for(;;){
+      index = returnString.indexOf("=", lastIndex+1);
+      if(index != 0){
+        String alias = "";
+        tempString = returnString.substring(lastIndex+1, index);
+        Serial.print(F("Alias: "));
+        Serial.println(tempString);
+        lastIndex = returnString.indexOf("&", index+1);
+        alias = tempString;
+        if(lastIndex != -1){
+          tempString = returnString.substring(index+1, lastIndex);
+        }else{
+          tempString = returnString.substring(index+1);
+        }
+
+
+        if (alias == "d2"){
+          if(tempString == "1"){
+            digitalWrite(2, 1);
+            Serial.println("set Digital2 to 1");
+          }else if(tempString == "0"){
+            digitalWrite(2, 0);
+            Serial.println("set Digital2 to 0");
+          }else{
+            Serial.print(F("Unknown Setting: "));
+            Serial.println(tempString);
+          }
+        } else {
+          Serial.println("Unknown Alias Dataport");
+        }
+
+        if(lastIndex == -1)
+          break;
+
+      }else{
+        Serial.println(F("No Index"));
+        break;
+      }
+    }
+
+  } else {
+    Serial.println("No Connection");
+    errorCount++;
+  }
+
+  delay(2000);
+}


Added the arduino code

Added the arduino code

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


Create bike_flasher.ino

Create bike_flasher.ino

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

--- bike_flasher.ino
+++ bike_flasher.ino
@@ -0,0 +1,50 @@
+//http://wayoda.github.io/LedControl/
+//http://playground.arduino.cc/Main/LedControl
+
+#include "LedControl.h"
+#include "binary.h"
+
+/*const DIN = 12;
+  const CS = 11;
+  const CLK = 10; */
+
+LedControl lc = LedControl (12,11,10,1);
+
+//Delay time between updates (mandatory)
+unsigned long delaytime = 100;
+
+void setup() {
+  lc.shutdown(0, false);
+  lc.setIntensity(0, 8);
+  lc.clearDisplay(0);
+}
+
+void writeArduinoOnMatrix() {
+
+  byte left[8]  = {0x0, 0x38, 0x70, 0xff, 0xff, 0x70, 0x38, 0x0};
+  byte off[8]   = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
+  byte brake[8] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
+
+}
+
+void rightArrow() {
+  byte right[8] = {0x0, 0x1c, 0xe, 0xff, 0xff, 0xe, 0x1c, 0x0};
+
+  lc.setRow(0,0,right[0]);
+  lc.setRow(0,1,right[1]);
+  lc.setRow(0,2,right[2]);
+  lc.setRow(0,3,right[3]);
+  lc.setRow(0,4,right[4]);
+  lc.setRow(0,5,right[5]);
+  lc.setRow(0,6,right[6]);
+  lc.setRow(0,7,right[7]);
+  delay(600);
+  lc.clearDisplay(0);
+  delay(600);
+}
+
+void loop() {
+  //writeArduinoOnMatrix();
+  //lc.setLed(0,0,1,true);
+  rightArrow();
+}


new sketch that sets servo to 90 degrees

error: pathspec 'servo-to-90-degrees/servo-to-90-degrees.ino' did not match any file(s) known to git

--- servo-to-90-degrees/servo-to-90-degrees.ino
+++ servo-to-90-degrees/servo-to-90-degrees.ino
@@ -0,0 +1,25 @@
+//-*- C -*-
+
+#include <Servo.h>
+
+Servo myservo;  // create servo object to control a servo
+                // a maximum of eight servo objects can be created
+
+// multiply by degrees to get radians
+//
+const double degrees_to_radians = 0.0174532925;
+
+void setup() {
+  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
+  myservo.write(90);
+
+  // initialize digital pin 13 as an output.
+  pinMode(13, OUTPUT);
+}
+
+void loop() {
+  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
+  delay(100);               // wait for a second
+  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
+  delay(100);               // wait for a second
+}


Readding prepare404Error() function into global namespace use outside of a specific http handler in case the server cant assign a handler.

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


Imports Arduino PID control code

Imports Arduino PID control code

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


Added a dimmed version without ms pulsing, as the pulsing was annoying by the TV

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


delete unuse serial communication

delete unuse serial communication

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


Went over to another 4x ATMega 328 devices to control IR lighting

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

--- src/TowerFloodIR/TowerFloodIR.ino
+++ src/TowerFloodIR/TowerFloodIR.ino
@@ -0,0 +1,232 @@
+// Compile for Arduino Pro/Pro Mini 5V 16Mhz with ATMega 328
+
+// need to strike RobotIRRemote directory in Arduino IDE libraries folder.  Name collision!
+#include <IRremote.h> // IR connected to pin 3
+#include <Streaming.h>
+#include <Metro.h>
+#include <Simon_Common.h> // I_RED, etc.
+#include <EasyTransfer.h> // rx, tx
+#include <SoftwareSerial.h> //
+
+SoftwareSerial SSerial(A2, A3); // to A2 and A3 on Tower Moteino, swapping the cabling
+EasyTransfer ET;
+colorInstruction lastColorInst, newColorInst;
+
+class IRlight {
+  public:
+    void begin( uint16_t address, byte sendCount,
+                byte on, byte off, byte up, byte down,
+                byte red, byte green, byte blue, byte yellow, byte white,
+                byte flash, byte strobe, byte fade, byte smooth );
+
+    void on(), off(), up(), down();
+    void flash(), strobe(), fade(), smooth();
+    void color(byte color);
+
+  private:
+    void send(byte code);
+    unsigned long generateCode(byte code);
+
+    boolean isOn;
+
+    uint16_t addressC;
+    byte onC, offC, upC, downC, redC, greenC, blueC, yellowC, whiteC, flashC, strobeC, fadeC, smoothC;
+    byte sendCount;
+    byte currentColor;
+
+};
+
+IRsend irsend;
+
+IRlight flood; // Loftek (50W) and off-brand (10W) floods, and RGB strip lighting.
+IRlight miniSubs; // cute little CR2032s
+IRlight packSubs; // pack-of-four submersibles
+
+// about 70 ms to send packet
+
+void setup()
+{
+  Serial.begin(115200);
+  Serial << "Startup." << endl;
+
+  SSerial.begin(9600);
+  ET.begin(details(newColorInst), &SSerial);
+
+  // LED for notable sending
+  pinMode(13, OUTPUT);
+
+  // minisubs
+  miniSubs.begin(0x01FE, 1, 0x48, 0x58, 0x48, 0x48, 0x20, 0xA0, 0x60, 0x50, 0x30, 0xC0, 0xC0, 0xC0, 0xC0);
+  // no up and down
+ // strictly address 0x01FE
+
+//  soondarSubs.begin(0x00FF, 0xA2, 0xE2, 0x52, 0x67, 0x22, 0x02, 0xC2, 0xA8, 0x10, 0x5A, 0x5A, 0x38, 0x38);
+// no strobe and smooth
+
+  // pack of submersibles
+  packSubs.begin(0x00FF, 1, 0xB0, 0xF8, 0x90, 0xB8, 0x98, 0xD8, 0x88, 0x38, 0xA8, 0xB2, 0x00, 0x58, 0x30 );
+//  packSubs.begin(0x0018, 2, 0xB0, 0xF8, 0x90, 0xB8, 0x98, 0xD8, 0x88, 0x38, 0xA8, 0xB2, 0x00, 0x30, 0xB2 );
+//  packSubs.begin(0x00F0, 0xB0, 0xF8, 0x90, 0xB8, 0x98, 0xD8, 0x88, 0x38, 0xA8, 0xB2, 0x00, 0x30, 0xB2 );
+  // addresses that work end in 1, 8 and C. 0x00FF, too.
+  // 0x???1, 0x???8, 0x???C and 0x00FF.
+  //  flood.color(color);
+
+  // strips, small floods, big floods
+  flood.begin(0x00F7, 1,   0xC0, 0x40, 0x00, 0x80, 0x20, 0xA0, 0x60, 0x28, 0xE0, 0xD0, 0xF0, 0xC8, 0xE8);
+//  for( byte i=0; i<10; i++) flood.up();
+  // 50W floods: any damn thing
+  // strips: 0x00F?
+  // 10W floods: 0x??F7
+
+  Serial << "On." << endl;
+  setOn();
+  setOn();
+  setOn();
+
+  Serial << F("Free RAM: ") << freeRam() << endl;
+}
+
+// first: obey address codes: strips, small floods, minisubs
+// last: DON'T obey address codes: pack subs, big floods
+void setColor(byte color) {
+  Serial << F("Instruction, color: ") << color << endl;
+
+  if( !ET.receiveData() ) miniSubs.color(color);
+  if( !ET.receiveData() ) packSubs.color(color);
+  if( !ET.receiveData() ) flood.color(color);
+}
+void setFade() {
+  Serial << F("Instruction, fade.")<< endl;
+
+  if( !ET.receiveData() ) miniSubs.fade();
+  if( !ET.receiveData() ) packSubs.fade();
+  if( !ET.receiveData() ) flood.fade();
+}
+void setOn() {
+  Serial << F("Instruction, on.")<< endl;
+
+  if( !ET.receiveData() ) miniSubs.on();
+  if( !ET.receiveData() ) packSubs.on();
+  if( !ET.receiveData() ) flood.on();
+}
+void setOff() {
+  Serial << F("Instruction, off.")<< endl;
+
+  if( !ET.receiveData() ) miniSubs.off();
+  if( !ET.receiveData() ) packSubs.off();
+  if( !ET.receiveData() ) flood.off();
+}
+
+void loop() {
+
+ // check SSerial
+  if( ET.receiveData() ) {
+    // have data.  is it different than last?
+    if( memcmp((void*)(&newColorInst), (void*)(&lastColorInst), sizeof(colorInstruction)) != 0 ) {
+      if( newColorInst.red > 0 && newColorInst.green > 0 && newColorInst.blue > 0 ) setColor(4); // white
+      else if( newColorInst.red > 0 && newColorInst.green > 0 ) setColor(I_YEL);
+      else if( newColorInst.red > 0 ) setColor(I_RED);
+      else if( newColorInst.green > 0 ) setColor(I_GRN);
+      else if( newColorInst.blue > 0 ) setColor(I_BLU);
+      else setOff();
+
+      lastColorInst = newColorInst;
+    }
+  }
+
+}
+
+void IRlight::begin(uint16_t address, byte sendCount,
+                byte on, byte off, byte up, byte down,
+                byte red, byte green, byte blue, byte yellow, byte white,
+                byte flash, byte strobe, byte fade, byte smooth ) {
+  // with this information set up codes
+
+  this->addressC = address;
+  this->sendCount = sendCount;
+
+  this->onC = on;
+  this->offC = off;
+  this->upC = up;
+  this->downC = down;
+
+  this->redC = red;
+  this->greenC = green;
+  this->blueC = blue;
+  this->yellowC = yellow;
+  this->whiteC = white;
+
+  this->flashC = flash;
+  this->strobeC = strobe;
+  this->fadeC = fade;
+  this->smoothC = smooth;
+
+  this->currentColor = 255; // not set
+  this->isOn = false;
+
+}
+
+void IRlight::color(byte color) {
+
+  // turn on.
+  if( !this->isOn ) this->on();
+
+  if( this->isOn && color == currentColor ) return; // no need.
+
+  // track
+  currentColor = color;
+
+  switch( color ) {
+    case I_RED: send(redC); break;
+    case I_GRN: send(greenC); break;
+    case I_BLU: send(blueC); break;
+    case I_YEL: send(yellowC); break;
+    default: send(whiteC); break;
+  }
+
+}
+
+void IRlight::on() { if( !this->isOn ) send(this->onC); this->isOn=true; }
+void IRlight::off() { if( this->isOn ) send(this->offC); this->isOn=false; }
+void IRlight::up() { send(this->upC); }
+void IRlight::down() { send(this->downC); }
+void IRlight::flash() { send(this->flashC); }
+void IRlight::strobe() { send(this->strobeC); }
+void IRlight::fade() { send(this->fadeC); }
+void IRlight::smooth() { send(this->smoothC); }
+
+void IRlight::send(byte code) {
+  unsigned long msg = generateCode(code);
+  Serial << "Send: " << _HEX(msg);
+  unsigned long tic, toc;
+
+  for( byte i=0; i<sendCount; i++ ) {
+    tic = millis();
+    digitalWrite(13, HIGH);
+    irsend.sendNEC(msg, 32);
+    digitalWrite(13, LOW);
+    toc = millis();
+    delay(100UL - (toc-tic));
+  }
+  Serial << " " << toc-tic << " ms. x" << sendCount << endl;
+
+}
+
+unsigned long IRlight::generateCode(byte code) {
+  unsigned long retCode=0;
+
+//  Serial << "generateCode: address=" << _HEX(address) << " code=" << _HEX(code) << " complement=" << _HEX(255 & ~code) << endl;
+
+  retCode |= ((unsigned long)this->addressC) << 16;
+  retCode |= ((unsigned long)code) << 8;
+  retCode |= (255 & ~code);
+
+  return( retCode );
+}
+
+int freeRam () {
+  extern int __heap_start, *__brkval;
+  int v;
+  return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
+}
+


add example which use isPulse and setSplitTime

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

--- examples/DCFCheck/DCFCheck.ino
+++ examples/DCFCheck/DCFCheck.ino
@@ -0,0 +1,72 @@
+#include <DCF77.h>
+#include <Time.h>
+
+#define DCF_PIN 2
+#define DCF_INTERRUPT 0
+
+#define BLINK_PIN 13
+
+#define ON_RISING_FLANK true
+
+bool last = LOW;
+
+DCF77 DCF(DCF_PIN, DCF_INTERRUPT, ON_RISING_FLANK);
+
+void setup() {
+  pinMode(BLINK_PIN, OUTPUT);
+
+  Serial.begin(9600);
+  DCF.Start();
+  DCF.setSplitTime(105, 205);
+}
+
+void loop() {
+  time_t DCFtime = DCF.getTime(); // Check if new DCF77 time is available
+  if (DCFtime!=0) {
+    setTime(DCFtime);
+    digitalClockDisplay();
+  }
+
+  if (DCF.isPulse()) {
+    if (ON_RISING_FLANK && last == LOW) {
+      Serial.println();
+    }
+    last = HIGH;
+    digitalWrite(BLINK_PIN, HIGH);
+    Serial.print("1");
+  } else {
+    if (!ON_RISING_FLANK && last == HIGH) {
+      Serial.println();
+    }
+    last = LOW;
+    digitalWrite(BLINK_PIN, LOW);
+    Serial.print("0");
+  }
+
+  delay(10);
+}
+
+void digitalClockDisplay(){
+  // digital clock display of the time
+  Serial.println();
+  Serial.println();
+  Serial.print(hour());
+  printDigits(minute());
+  printDigits(second());
+  Serial.print(" ");
+  Serial.print(day());
+  Serial.print(" ");
+  Serial.print(month());
+  Serial.print(" ");
+  Serial.print(year());
+  Serial.println();
+  Serial.println();
+}
+
+void printDigits(int digits){
+  // utility function for digital clock display: prints preceding colon and leading 0
+  Serial.print(":");
+  if(digits < 10)
+    Serial.print('0');
+  Serial.print(digits);
+}


DistCV v0.1

DistCV v0.1

sonar distance to CV

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

--- DistCV/DistCV_firmeware/DistCV_firmeware.ino
+++ DistCV/DistCV_firmeware/DistCV_firmeware.ino
@@ -0,0 +1,43 @@
+/* KID MODULAR - DistCV v0.1
+ *  a project by Sonoscopia
+ *  developed by Tiago Ângelo (aka p1nh0) - 15.06.2017
+ *
+ */
+
+#include <NewPing.h>
+
+#define TRIGGER_PIN  12
+#define ECHO_PIN     11
+#define MAX_DISTANCE 100 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.
+
+#define POT1 0
+#define POT2 1
+#define CVOUT 9
+#define RED 5
+#define GREEN 6
+
+byte mMin, mMax, dist, cv;
+
+NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.
+
+void setup() {
+  Serial.begin(115200); // Open serial monitor at 115200 baud to see ping results.
+  pinMode(CVOUT, OUTPUT);
+  pinMode(RED, OUTPUT);
+  pinMode(GREEN, OUTPUT);
+}
+
+void loop() {
+  delay(50);                     // Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings.
+  Serial.print("Ping: ");
+  dist = sonar.ping_cm();
+  Serial.print(sonar.ping_cm()); // Send ping, get distance in cm and print result (0 = outside set distance range)
+  Serial.println("cm");
+
+  // read pots
+  mMin = analogRead(POT1);
+  mMax = analogRead(POT2);
+
+  cv = map(dist, 0, MAX_DISTANCE, mMin, mMax);
+  analogWrite(CVOUT, cv);
+}


Add QuickStart example

Add QuickStart example

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

--- examples/QuickStart/QuickStart.ino
+++ examples/QuickStart/QuickStart.ino
@@ -0,0 +1,98 @@
+#include <TheThingsNetwork.h>
+
+// Set your AppEUI and AppKey
+const byte appEui[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+const byte appKey[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
+#define debugSerial Serial
+#define loraSerial Serial1
+
+#define debugPrintLn(...) { if (debugSerial) debugSerial.println(__VA_ARGS__); }
+#define debugPrint(...) { if (debugSerial) debugSerial.print(__VA_ARGS__); }
+
+TheThingsNetwork ttn;
+
+void setup() {
+  debugSerial.begin(9600);
+  loraSerial.begin(57600);
+
+  // Wait a maximum of 10s for Serial Monitor
+  uint32_t timeout = millis() + 10000;
+  while (!debugSerial && millis() < timeout);
+
+  ttn.init(loraSerial, debugSerial);
+
+  debugPrintLn("-- RESET");
+  ttn.reset();
+
+  // Wait 10s between each attempt to get a confirmed activation
+  debugPrintLn("-- JOIN");
+  while(!ttn.join(appEui, appKey)){
+    delay(10000);
+  }
+
+  debugPrintLn("-- STATUS");
+  ttn.showStatus();
+}
+
+void loop() {
+  debugPrintLn("-- LOOP");
+
+  // Get uptime in ms (resets every 50 days)
+  uint32_t uptime = millis();
+  debugPrintLn("Uptime (ms): " + String(uptime));
+
+  // Encode uptime into 4 bytes
+  unsigned char bytes[4];
+  longToBytes(uptime, bytes);
+  debugPrintLn("Uptime (bytes in hex): " + bytesToHexString(bytes, 4));
+
+  // Send and check for incoming message size
+  int downlinkSize = ttn.sendBytes(bytes, 4);
+
+  if (downlinkSize > 0) {
+    debugPrintLn("Downlink (bytes in hex): " + bytesToHexString(ttn.downlink, downlinkSize));
+    debugPrintLn("Port: " + String(ttn.downlinkPort));
+
+    // Only handle messages to port 1 with a size of 1 byte
+    if (ttn.downlinkPort == 1 && downlinkSize == 1) {
+
+      // Check the byte
+      switch (ttn.downlink[0]) {
+        case 0x00:
+          debugPrintLn("LED: off");
+          digitalWrite(LED_BUILTIN, LOW);
+          break;
+        case 0x01:
+          debugPrintLn("LED: on");
+          digitalWrite(LED_BUILTIN, HIGH);
+          break;
+      }
+    }
+  }
+
+  delay(10000);
+}
+
+void longToBytes(long lng, byte bytes[]) {
+  bytes[0] = (int) ((lng & 0xFF000000) >> 24 );
+  bytes[1] = (int) ((lng & 0x00FF0000) >> 16 );
+  bytes[2] = (int) ((lng & 0x0000FF00) >> 8  );
+  bytes[3] = (int) ((lng & 0X000000FF)       );
+}
+
+String bytesToHexString(const byte* bytes, int length) {
+  String str = "";
+  for (int i = 0; i < length; i++) {
+    if (i > 0) {
+      str += " ";
+    }
+    String hex = String(bytes[i], HEX);
+    if (hex.length() != 2) {
+      str += "0";
+    }
+    str += hex;
+  }
+  str.toUpperCase();
+  return str;
+}


whew last example

whew last example

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/dwwkelly/Adafruit_Motor_Shield_V2_Library.git/'


Scan for I2C devices on Jeenode

Scan for I2C devices on Jeenode

Scan for I2C devices on a Jeenode port that is set up as an I2C bus.

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

--- sketches/utils/i2c_scan/i2c_scan.ino
+++ sketches/utils/i2c_scan/i2c_scan.ino
@@ -0,0 +1,78 @@
+/**
+ * Script to scan an I2C bus for devices. Blink an LED on Jeenode
+ * port 3 to show the sketch is active.
+ *
+ * The concept for this sketch came from todbot's work on BlinkM's. See
+ * http://todbot.com/blog/2009/11/29/i2cscanner-pde-arduino-as-i2c-bus-scanner/
+ *
+ * I2C pins
+ *
+ * JN port pins
+ * (1) not used
+ * (2) DIO as SDA
+ * (3) GND
+ * (4) VCC (+)
+ * (5) AIO as SCL
+ * (6) not used
+ *
+ * BlinkM pins
+ * (1) GND
+ * (2) VCC (+)
+ * (3) SDA
+ * (4) SCL
+ *
+ * Pin mappings from Jeenode to BlinkM
+ * Jeenode   BlinkM
+ * Pin 2     Pin 3
+ * Pin 3     Pin 1
+ * Pin 4     Pin 2
+ * Pin 5     Pin 4
+ *
+ * Be sure to set the Jeenode port number.
+ * Set the BlinkM to be powered externally and power
+ * it or it won't respond
+ *
+ * @author Bill <bill@jamimi.com>
+ * @license http://opensource.org/licenses/mit-license.php
+ */
+
+#include <JeeLib.h>
+
+// Jeenode port to scan
+const byte portNum = 2;
+
+// The I2C bus and device objects
+PortI2C i2cBus (portNum);
+// Device address is set during scan
+DeviceI2C dev (i2cBus, 0);
+
+// Blink an LED on Jeenode port 3 to show the sketch is active
+Port led (3);
+
+const byte loDevId = 1;
+const byte hiDevId = 127;
+
+void setup () {
+  Serial.begin(57600);
+  Serial.print("\nScan I2C bus on port ");
+  Serial.println(portNum);
+
+  led.mode(OUTPUT);
+
+  // Scan for devices
+  for (byte devid = loDevId; devid <= hiDevId; devid++) {
+    dev.setAddress(devid);
+    Serial.print(devid, DEC);
+    Serial.print(": ");
+    dev.isPresent() ? Serial.print("yes") : Serial.print("no");
+    devid % 8 ? Serial.print('\t') : Serial.print('\n');
+  }
+}
+
+void loop () {
+  // Blink the LED
+  led.digiWrite(1);
+  delay(50);
+  led.digiWrite(0);
+  delay(950);
+}


unfinished test op

unfinished test op

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

--- dfft.ino
+++ dfft.ino
@@ -0,0 +1,87 @@
+#include <Audio.h>
+#include <Wire.h>
+#include <SPI.h>
+#include <SD.h>
+#include <SerialFlash.h>
+
+// GUItool: begin automatically generated code
+AudioInputAnalog         adc1;           //xy=175,142
+AudioInputAnalog         adc2(A3);           //xy=197,252
+AudioAnalyzePeak         peak2;          //xy=318,322
+AudioAnalyzePeak         peak1;          //xy=330,78
+AudioFilterStateVariable filter1;        //xy=360,141
+AudioFilterStateVariable filter2;        //xy=360,253
+AudioRecordQueue         queue1;         //xy=506,133
+AudioRecordQueue         queue2;         //xy=526,277
+AudioConnection          patchCord1(adc1, peak1);
+AudioConnection          patchCord2(adc1, 0, filter1, 0);
+AudioConnection          patchCord3(adc2, peak2);
+AudioConnection          patchCord4(adc2, 0, filter2, 0);
+AudioConnection          patchCord5(filter1, 0, queue1, 0);
+AudioConnection          patchCord6(filter2, 0, queue2, 0);
+// GUItool: end automatically generated code
+
+const int readPinC = A2;
+const int readPin1 = A3;
+
+elapsedMicros time;
+
+int mode = 0;
+
+void steup() {
+
+	pinMode(LED_BUILTIN, OUTPUT);
+	pinMode(readPinC, INPUT);
+	pinMode(readPin1, INPUT);
+
+	filter1.frequency(1000);
+	filter2.frequency(1000);
+
+	AudioMemory(60);
+
+	Serial.begin(9600);
+
+	uint16_t sampleC* = queue1.readBuffer();
+	uint16_t sample* = queue2.readBuffer();
+}
+
+void loop() {
+
+}
+
+void startRecording() {
+	Serial.println("Recording...");
+	queue2.begin();
+}
+
+void continueRecording() {
+
+	byte toFFT[1024];
+	short int w = 0;
+
+	while(w <= 1024) {
+
+		if (queue2.available() >= 2) {
+			byte buffer[128];
+
+			memcpy(buffer, queue2.readBuffer(), 128);
+			queue2.freeBuffer();
+
+			byte sample* = buffer;
+
+			short int i = 0;
+
+			while(*sample) {
+
+				if( i % 22 == 0) {
+
+					toFFT[w] = *sample;
+					w++;
+				}
+				i++;
+				sample += sizeof(byte);
+				// only need 4 more samples
+			}
+		}
+	}
+}


Add HelloSatellite.ino from Arduino IDE

Add HelloSatellite.ino from Arduino IDE

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

--- HelloSatellite/HelloSatellite.ino
+++ HelloSatellite/HelloSatellite.ino
@@ -0,0 +1,106 @@
+#include <LiquidCrystal.h>
+
+LiquidCrystal lcd(14, 15, 5, 4, 3, 2);
+
+void setup() { // Displays Octicat and "GitHub Satellite" to LCD
+  lcd.begin(16, 2); // Initializes the LCD and states size in rows, columns
+
+  byte octotl[8] = //top-left of octicat icon
+  {
+    0b01000,
+    0b01111,
+    0b01111,
+    0b11111,
+    0b10000,
+    0b10010,
+    0b01000,
+    0b01111
+  };
+
+byte octotr[8] = //top-right of octicat icon
+  {
+    0b00010,
+    0b11110,
+    0b11110,
+    0b11111,
+    0b00001,
+    0b01001,
+    0b00010,
+    0b11110
+  };
+
+  byte octobl[8] = //bottom-left of octicat icon
+  {
+    0b00001,
+    0b10011,
+    0b01111,
+    0b00011,
+    0b00101,
+    0b00010,
+    0b00000,
+    0b11111
+  };
+
+  byte octobr[8] = //bottom-right of octicat icon
+  {
+    0b10000,
+    0b11000,
+    0b11000,
+    0b11000,
+    0b10100,
+    0b01000,
+    0b00000,
+    0b11111
+  };
+
+byte octowv[8] = { //octowave
+  0b10001,
+  0b01011,
+  0b00111,
+  0b00011,
+  0b00101,
+  0b00010,
+  0b00000,
+  0b11111
+};
+
+    // create a new custom character
+    lcd.createChar(0, octotl);
+    lcd.createChar(1, octotr);
+    lcd.createChar(2, octobl);
+    lcd.createChar(3, octobr);
+    lcd.createChar(4, octowv);
+}
+
+void loop() {
+  // set custom character position
+  lcd.setCursor(0, 0);
+  // write custom character 0
+  lcd.write((uint8_t)0);
+  // write custom character 1
+  lcd.write((uint8_t)1);
+  // Displays "GitHub"
+  lcd.write("  GitHub");
+
+  // set custom character position
+  lcd.setCursor(0, 1);
+  // write custom character 2
+  lcd.write((uint8_t)2);
+  // write custom character 3
+  lcd.write((uint8_t)3);
+  // Displays "Satellite"
+  lcd.write("  Satellite");
+
+  delay(1000);
+
+  // set custom character position
+  lcd.setCursor(0, 1);
+  // write custom character 2
+  lcd.write((uint8_t)4);
+  // write custom character 3
+  lcd.write((uint8_t)3);
+  // Displays "Satellite"
+  lcd.write("  Satellite");
+
+  delay(1000);
+}


ajouter test http arduino code

ajouter test http arduino code

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

--- hardware/Arduino_Code/test_network3g/test_network3g.ino
+++ hardware/Arduino_Code/test_network3g/test_network3g.ino
@@ -0,0 +1,247 @@
+/*
+ *  Description: This example shows how to do a GET method. So the buffer of
+ *  is limited, we recommend to use the GET method with short answer for the
+ *  requested webs.
+ *  This example shows the AT commands (and the answers of the module) used
+ *  to work with HTTP. For more information about the AT commands,
+ *  refer to the AT command manual.
+ *
+ *  Copyright (C) 2013 Libelium Comunicaciones Distribuidas S.L.
+ *  http://www.libelium.com
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *  Version 0.2
+ *  Author: Alejandro Gallego
+ */
+
+
+int8_t answer;
+int onModulePin = 2, aux;
+int data_size = 0;
+int end_file = 0;
+
+char aux_str[100];
+
+char data[250];
+int x = 0;
+long previous;
+
+char url[ ]="";
+int port= 3000;
+char request[ ]="ok";
+
+
+
+void setup(){
+
+    pinMode(onModulePin, OUTPUT);
+    Serial.begin(9600);
+
+    Serial.println("Starting...");
+    power_on();
+
+    delay(3000);
+
+    // sets the PIN code
+    sendATcommand("AT+CPIN=1234", "OK", 2000);
+
+    delay(3000);
+
+    while( (sendATcommand("AT+CREG?", "+CREG: 0,1", 500) ||
+        sendATcommand("AT+CREG?", "+CREG: 0,5", 500)) == 0 );
+
+    // sets APN, user name and password
+    sendATcommand("AT+CGSOCKCONT=1,\"127.0.0.1\",\"free\"", "OK", 2000);
+    sendATcommand("AT+CSOCKAUTH=1,1,\"\",\"\"", "OK", 2000);
+}
+void loop(){
+/*
+    // request the url
+    sprintf(aux_str, "AT+CHTTPACT=\"%s\",%d", url, port);
+    answer = sendATcommand(aux_str, "+CHTTPACT: REQUEST", 60000);
+
+    if (answer == 1)
+    {
+        Serial.println(request);
+        // Sends <Ctrl+Z>
+        aux_str[0] = 0x1A;
+        aux_str[1] = 0x00;
+        answer = sendATcommand(aux_str, "+CHTTPACT: DATA,", 60000);
+
+        x=0;
+        do{
+            if (answer == 1)
+            {
+                data_size = 0;
+                while(Serial.available()==0);
+                aux = Serial.read();
+                do{
+                    data_size *= 10;
+                    data_size += (aux-0x30);
+                    while(Serial.available()==0);
+                    aux = Serial.read();
+                }
+                while(aux != 0x0D);
+
+                Serial.print("Data received: ");
+                Serial.println(data_size);
+
+                if (data_size > 0)
+                {
+                    while(Serial.available() < data_size);
+                    Serial.read();
+
+                    for (int y = 0; y < data_size; y++)
+                    {
+                        data[x] = Serial.read();
+                        x++;
+                    }
+                    data[x] = '\0';
+                }
+                else
+                {
+                    Serial.println("Download finished");
+                }
+            }
+            else
+            {
+                Serial.println("Error getting the url");
+                data_size = 0;
+            }
+
+            answer = sendATcommand2("", "+CHTTPACT: DATA,", "+CHTTPACT:0", 20000);
+
+        }while (answer != 1);
+
+        if (answer == 2)
+        {
+            Serial.print("Data received:");
+            Serial.println(data);
+        }
+        else
+        {
+            Serial.println("Error getting data");
+        }
+    }
+    else
+    {
+        Serial.println("Error waiting the request");
+    }
+
+    delay(10000);
+*/
+}
+
+void power_on(){
+
+    uint8_t answer=0;
+
+    // checks if the module is started
+    answer = sendATcommand("AT", "OK", 2000);
+    if (answer == 0)
+    {
+        // power on pulse
+        digitalWrite(onModulePin,HIGH);
+        delay(3000);
+        digitalWrite(onModulePin,LOW);
+
+        // waits for an answer from the module
+        while(answer == 0){
+            // Send AT every two seconds and wait for the answer
+            answer = sendATcommand("AT", "OK", 2000);
+        }
+    }
+
+}
+
+
+int8_t sendATcommand(char* ATcommand, char* expected_answer1,
+            unsigned int timeout)
+{
+
+    uint8_t x=0,  answer=0;
+    char response[100];
+    unsigned long previous;
+
+    memset(response, '\0', 100);    // Initialize the string
+    delay(100);
+    while( Serial.available() > 0) Serial.read();    // Clean the input buffer
+    Serial.println(ATcommand);    // Send the AT command
+    x = 0;
+    previous = millis();
+
+    // this loop waits for the answer
+    do{
+
+        if(Serial.available() != 0){
+            response[x] = Serial.read();
+            x++;
+            // check if the desired answer is in the response of the module
+            Serial.println(response[x]);
+            if (strstr(response, expected_answer1) != NULL)
+            {
+                answer = 1;
+            }
+        }
+        // Waits for the asnwer with time out
+    }
+    while((answer == 0) && ((millis() - previous) < timeout));
+    return answer;
+}
+
+/*
+int8_t sendATcommand2(char* ATcommand, char* expected_answer1,
+         char* expected_answer2, unsigned int timeout)
+{
+
+    uint8_t x=0,  answer=0;
+    char response[100];
+    unsigned long previous;
+
+    memset(response, '\0', 100);    // Initialize the string
+
+    delay(100);
+
+    while( Serial.available() > 0) Serial.read();    // Clean the input buffer
+
+    Serial.println(ATcommand);    // Send the AT command
+
+
+    x = 0;
+    previous = millis();
+
+    // this loop waits for the answer
+    do{
+
+        if(Serial.available() != 0){
+            response[x] = Serial.read();
+            x++;
+            // check if the desired answer is in the response of the module
+            if (strstr(response, expected_answer1) != NULL)
+            {
+                answer = 1;
+            }
+            // check if the desired answer is in the response of the module
+            if (strstr(response, expected_answer2) != NULL)
+            {
+                answer = 2;
+            }
+        }
+        // Waits for the asnwer with time out
+    }
+    while((answer == 0) && ((millis() - previous) < timeout));
+
+    return answer;
+}*/


Adding code without debouncing

Adding code without debouncing

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

--- Button_Debouncing/Button_Debouncing.ino
+++ Button_Debouncing/Button_Debouncing.ino
@@ -0,0 +1,21 @@
+const int BTN = 12;
+const int LED = 3;
+
+bool ledOn = false;
+
+void setup() {
+  pinMode(BTN, INPUT);
+  pinMode(LED, OUTPUT);
+}
+
+void loop() {
+  if (digitalRead(BTN)){
+    ledOn = !ledOn;
+    if (ledOn){
+      digitalWrite(LED, HIGH);
+    }
+    else{
+      digitalWrite(LED, LOW);
+    }
+  }
+}


FreqMeasureSerial

FreqMeasureSerial

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

--- FreqMeasureSerial/FreqMeasureSerial.ino
+++ FreqMeasureSerial/FreqMeasureSerial.ino
@@ -0,0 +1,33 @@
+/* FreqMeasure - Example with serial output
+ * http://www.pjrc.com/teensy/td_libs_FreqMeasure.html
+ *
+ * This example code is in the public domain.
+ */
+#include <FreqMeasure.h>
+
+void setup() {
+  Serial.begin(9600);
+  Serial.println("begin");
+  FreqMeasure.begin();
+}
+
+void loop() {
+  Serial.print("available:");
+  Serial.print(FreqMeasure.available());
+  if (FreqMeasure.available()) {
+    Serial.print(" ");
+    int a = FreqMeasure.available();
+    for (int i=0;i<a;i++)
+    {
+    uint32_t n = FreqMeasure.read();
+    float frequency = FreqMeasure.countToFrequency(n);
+    //Serial.print(n);
+    //Serial.print(" ");
+    Serial.print(frequency);
+    Serial.print(" ");
+    }
+  }
+  Serial.println();
+  delay(1000);              // wait for a second
+}
+


Intel Code

Intel Code

error: pathspec 'Intel' did not match any file(s) known to git
error: pathspec 'Edison' did not match any file(s) known to git
error: pathspec 'Code/SmartEDU/SmartEDU.ino' did not match any file(s) known to git


Create chase_target_values_verC.ino

Create chase_target_values_verC.ino

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

--- chase_target_values_verC.ino
+++ chase_target_values_verC.ino
@@ -0,0 +1,151 @@
+// Test of chasing random target values, version C.  (Slowed down)
+//
+// Random target values are generated and assigned to random pixels.
+// Pixel brightness is then increased or decreased toward the target.
+//
+// This version incorporates a hue shift based on the pixel value.
+// The high and low color choices can be changed below in the variables.
+// Saturation is kept at full, but it could also easily be tweaked.
+//
+//
+// Marc Miller,  Jan 2016
+//---------------------------------------------------------------
+
+
+#include "FastLED.h"
+#define LED_TYPE LPD8806  // *Update to your strip type.  NEOPIXEL, APA102, LPD8806, etc..
+#define COLOR_ORDER GRB
+#define DATA_PIN 11         // *Set this to your data pin.
+#define CLOCK_PIN 13
+#define NUM_LEDS 32        // *Update to the number of pixels in your strip.
+
+#define MASTER_BRIGHTNESS 140
+
+CRGB leds[NUM_LEDS];
+CHSV leds_vu[NUM_LEDS];  // FastLED array using HSV.
+
+uint8_t target[NUM_LEDS];  // Array to store target (brightness) values.
+uint8_t delta;  // Amount to increase/decrease (brightness) value by.
+uint8_t pixel;  // Which pixel to operate on.
+uint8_t temp;  // Used for testing.
+uint8_t highCutoff = 230;  // High value where hue ramp ends.
+uint8_t lowCutoff = 20;  // Low value cutoff before flooring to zero.
+uint8_t ccc = 0;  // color combination choice (ccc)
+
+// Initial color combinations choice (ccc = 0)
+uint8_t hue_high = 0;  // red for high values with,
+uint8_t hue_low = 96;  // green for low values.
+
+
+//---------------------------------------------------------------
+void setup() {
+  Serial.begin(115200);  // Allows serial output (check baud rate)
+  delay(3000);  // 3 second delay
+  //FastLED.addLeds<LED_TYPE,DATA_PIN>(leds, NUM_LEDS);
+  FastLED.addLeds<LED_TYPE, DATA_PIN, CLOCK_PIN, COLOR_ORDER>(leds, NUM_LEDS);
+  FastLED.setBrightness(MASTER_BRIGHTNESS);
+}
+
+//---------------------------------------------------------------
+void loop() {
+  // Assign new random target values after a bit.
+  EVERY_N_MILLISECONDS(2000) {
+    for (int i=0; i < ( NUM_LEDS / 2 ); i++){  // Only do about half the pixels.
+      pixel = random8(NUM_LEDS);  // Pick random pixel.
+      target[pixel] = random8();  // Assign random value.
+      while (target[pixel] > 90 && target[pixel] < 160) {  // Avoid some middle values, pick again.
+        target[pixel] = random8();  // Assign another random value.
+      }
+      if (target[pixel] < lowCutoff){
+        target[pixel] = 0;  // Force low values to clamp to zero.
+      }
+    }
+    Serial.println("*New targets assigned!*");
+  }//end assign new target values
+
+
+  EVERY_N_MILLISECONDS(50) {
+    for (uint8_t i=0; i < NUM_LEDS; i++){
+      // Check current values against target values.
+      if (leds_vu[i].value < target[i]){  // less then the target, so fade up.
+        delta = ((target[i] - leds_vu[i].value) / 8) + 1;
+        if (leds_vu[i].value + delta >= target[i]){
+          leds_vu[i].value = target[i];  // limit to target.
+        }
+        else {
+          leds_vu[i].value = leds_vu[i].value + delta;
+        }
+      }
+      else {  // greater then the target, so fade down.
+        delta = ((leds_vu[i].value - target[i]) / 8) + 1;  // +1 so delta is always at least 1.
+        if (leds_vu[i].value - delta <= target[i]){
+          leds_vu[i].value = target[i];  // limit to target.
+        }
+        else {
+          leds_vu[i].value = leds_vu[i].value - delta;
+        }
+      }
+      if (i == 0){ temp = delta; }  // Save first pixel's delta to print below.
+
+      // Tweak hue color based on brightness.
+      int c_hue = constrain(leds_vu[i].value,lowCutoff,highCutoff);
+      leds_vu[i].hue = map(c_hue, lowCutoff, highCutoff, hue_low, hue_high);
+                    // map(valueIn, fromLow,   fromHigh,   toLow,   toHigh)
+
+      // Set saturation.
+      leds_vu[i].saturation = 255;
+
+      // Copy the HSV leds_vu[] data to the leds[] array.
+      leds[i] = leds_vu[i];
+        // FastLED will automatically convert HSV to RGB data.  Converting from HSV
+        // to RGB is very fast and also accurate.  It is also possible to convert from
+        // RGB to HSV, but it is not automatic, not as acurate, and not as fast.
+
+    }//end of looping over all the pixels checking targets.
+  }//end EVERY_N*
+
+  // Continuosly fade target to zero.
+  EVERY_N_MILLISECONDS(20) {
+    for (int j=0; j < NUM_LEDS; j++){
+      if (target[j] > lowCutoff){
+        target[j] -= 1;  // Fade by this amount.
+      }
+      else {
+        target[j] = 0;  // If target less then lowCutoff, clamp to zero.
+      }
+    }
+  }//end of continuously fading target down.
+
+  // Print out info for led[0] to understand how the numbers are changing.
+  EVERY_N_MILLISECONDS(50) {
+    //Serial.print("  target = "); Serial.print(target[0]);
+    ////Serial.print("\t  leds_vu[0].hue = "); Serial.print(leds_vu[0].hue);
+    //Serial.print("\t  leds_vu[0].val = "); Serial.print(leds_vu[0].value);
+    //Serial.print("\t  delta = "); Serial.println(temp);
+  }
+
+  FastLED.show();  // Display the leds[] array.
+
+  EVERY_N_SECONDS(10) {  // Pick a new color combination choice (ccc).
+    ccc =  random(4);
+    if (ccc == 0) {
+      hue_high = 0;  // red for high values
+      hue_low = 96;  // green for low values
+    }
+    if (ccc == 1) {
+      hue_high = 96;  // green for high values
+      hue_low = 192;  // purple for low values
+    }
+    if (ccc == 2) {
+      hue_high = 105;  // green for high values
+      hue_low = 15;  // red for low values
+    }
+    if (ccc == 3) {
+      hue_high = 82;  // yellow-green for high values
+      hue_low = 140;  // aqua for low values
+    }
+    Serial.print("*Color combination choice done!*  ccc: "); Serial.println(ccc);
+  }//end EVERY_N* ccc
+
+}//end main loop
+


6 motors

6 motors

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


add arduino code

add arduino code

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

--- arduino/Nagalier_SciHackDay2013/Nagalier_SciHackDay2013.ino
+++ arduino/Nagalier_SciHackDay2013/Nagalier_SciHackDay2013.ino
@@ -0,0 +1,92 @@
+//LED code for Nagaliers. Changes your lighting based on your activity level logged by Fitbit.
+/*************************************************************************************/
+
+#include "FastSPI_LED2.h"
+#define NUM_LEDS 60
+
+struct CRGB leds[NUM_LEDS];
+int colorval = 0; // Variable to hold the changing "mood light" strip color.
+int steps=0;
+
+void setup() {
+  LEDS.setBrightness(250);
+  LEDS.addLeds<WS2811, 5>(leds, NUM_LEDS);
+    Serial.begin(9600);
+}
+
+
+void loop() {
+  //get the step count
+     if  (Serial.available() > 0) {
+      steps = Serial.read();
+     }
+    //light up the strip!
+    if(steps==255) rainbow(colorval % 384); //if you've met your step goal
+    else if(steps==0) angryFlash(); // if you're behind schedule
+    else  RGBcolorFill(steps); // if you're making progress
+    colorval++; // increment the color for the reward rainbow when you've met step goals.
+}
+
+
+//Fill the strip with 1/3 of a rainbow, starting from color c
+void rainbow(uint32_t c) {
+  uint16_t i;
+    for (i=0; i < NUM_LEDS; i++) {
+      leds[i] = RGBWheel(((i * 128 / NUM_LEDS) + c) % 384); // 128 = 384/3 = 1/3 of the rainbow.
+    }
+    LEDS.show();
+}
+
+// Fill the strip with a single color.
+void RGBcolorFill(uint32_t c) {
+  int i;
+  c = map(c, 0, 255, 0, 300);
+  for (i=0; i < NUM_LEDS; i++) {
+      leds[i] = RGBWheel(c); // set all active pixels on
+  }
+  LEDS.show();
+ }
+
+// Flash red.
+void angryFlash() {
+  int i;
+  //Turn strip red.
+  for (i=0; i < NUM_LEDS; i++) {
+      leds[i] = CRGB(0, 255, 0); // set all active pixels red
+  }
+  LEDS.show();
+  delay(100);
+  //Turn strip off.
+  for (int i=0; i < NUM_LEDS; i++) {
+  memset(leds, 0,  NUM_LEDS * sizeof(struct CRGB));
+  }
+  LEDS.show();
+  delay(100);
+ }
+
+/* RGB Color Wheel Helper function */
+//Input a value 0 to 384 to get a color value.
+CRGB RGBWheel(uint16_t WheelPos) {
+  byte r, g, b;
+  switch(WheelPos / 128)
+  {
+    case 0:
+      r = 127 - WheelPos % 128; // red down
+      g = WheelPos % 128;       // green up
+      b = 0;                    // blue off
+      break;
+    case 1:
+      g = 127 - WheelPos % 128; // green down
+      b = WheelPos % 128;       // blue up
+      r = 0;                    // red off
+      break;
+    case 2:
+      b = 127 - WheelPos % 128; // blue down
+      r = WheelPos % 128;       // red up
+      g = 0;                    // green off
+      break;
+  }
+  return(CRGB(b, r, g));    //colors are in a stupid order.
+}
+
+


First version of esp code.

First version of esp code.

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

--- esp8266/main/main.ino
+++ esp8266/main/main.ino
@@ -0,0 +1,328 @@
+#include <ESP8266WiFi.h>
+//#include <WiFiClient.h>
+#include <DNSServer.h>
+#include <ESP8266WebServer.h>
+#include <WiFiManager.h>
+#include <ESP8266mDNS.h>
+#include <ArduinoJson.h>
+#include <cmath>
+const int redPin_    = 15; //12
+const int greenPin_  = 13; //15
+const int bluePin_   = 12; //13
+const int w1Pin_     = 14;
+const int w2Pin_     = 4;
+const int led1Pin_   = 5;
+const int led2Pin_   = 1;
+const int pwmRange_ = 1023;
+ESP8266WebServer server(80);
+
+/**
+ * Data structure for CIE 1976 UCS color coordinates
+ */
+struct Cie1976Ucs {
+  float L;
+  float u;
+  float v;
+} luv_;
+
+/**
+ * Data structure for RGB color
+ */
+struct RGB {
+  float R;
+  float G;
+  float B;
+} raw_;
+
+/**
+ * Get raw pwm values
+ * Values are normalized in the range 0..1
+ */
+RGB getRaw () {
+  return raw_;
+}
+
+/**
+ * Set raw pwm values
+ * Values must be normalized to the range 0..1
+ */
+void setRaw (RGB raw) {
+
+  // Limit values in the range 0..1
+  if (raw.R < 0) raw.R = 0;
+  if (raw.R > 1) raw.R = 1;
+  if (raw.G < 0) raw.G = 0;
+  if (raw.G > 1) raw.G = 1;
+  if (raw.B < 0) raw.B = 0;
+  if (raw.B > 1) raw.B = 1;
+
+  // Convert input floats to integers in the pwm range
+  int pwmR = static_cast<int>(raw.R * pwmRange_ + 0.5);
+  int pwmG = static_cast<int>(raw.G * pwmRange_ + 0.5);
+  int pwmB = static_cast<int>(raw.B * pwmRange_ + 0.5);
+
+  // Write PWMs
+  analogWrite(redPin_, pwmR);
+  analogWrite(greenPin_, pwmG);
+  analogWrite(bluePin_, pwmB);
+
+  Serial.print("Wrote PWM: ");
+  Serial.print(pwmR); Serial.print(", ");
+  Serial.print(pwmG); Serial.print(", ");
+  Serial.println(pwmB);
+
+  // Save values
+  raw_.R = static_cast<float>(pwmR) / pwmRange_;
+  raw_.G = static_cast<float>(pwmG) / pwmRange_;
+  raw_.B = static_cast<float>(pwmB) / pwmRange_;
+
+  Serial.print("Saved raw: ");
+  Serial.print(raw_.R); Serial.print(", ");
+  Serial.print(raw_.G); Serial.print(", ");
+  Serial.println(raw_.B);
+}
+
+/**
+ * Get CIE 1976 UCS color coordinates
+ */
+Cie1976Ucs getCie1976Ucs () {
+  return luv_;
+}
+
+/**
+ * Set CIE 1976 UCS color coordinates
+ */
+void setCie1976Ucs (Cie1976Ucs luv) {
+
+  Serial.print("Setting luv: ");
+  Serial.print(luv.L); Serial.print(", ");
+  Serial.print(luv.u); Serial.print(", ");
+  Serial.println(luv.v);
+
+  // Save values
+  luv_.L = luv.L;
+  luv_.u = luv.u;
+  luv_.v = luv.v;
+
+  // Convert to raw PWM values
+  RGB raw;
+  raw.R = 1 - 2 * sqrt( pow((luv.u - 0.5444), 2.0) + pow((luv.v - 0.5183), 2.0) );
+  raw.G = 1 - 2 * sqrt( pow((luv.u - 0.0412), 2.0) + pow((luv.v - 0.5837), 2.0) );
+  raw.B = 1 - 2 * sqrt( pow((luv.u - 0.1232), 2.0) + pow((luv.v - 0.1657), 2.0) );
+
+  Serial.print("Converted to raw: ");
+  Serial.print(raw.R); Serial.print(", ");
+  Serial.print(raw.G); Serial.print(", ");
+  Serial.println(raw.B);
+
+  // Write PWMs
+  setRaw(raw);
+}
+
+/**
+ * Getters and setters for onboard leds
+ */
+bool getLed1 () { return !digitalRead(led1Pin_); }
+void setLed1 (bool val) { digitalWrite(led1Pin_, !val); }
+bool getLed2 () { return !digitalRead(led2Pin_); }
+void setLed2 (bool val) { digitalWrite(led2Pin_, !val); }
+
+/**
+ * Responses with PWM, CIE1976UCS and sRGB values
+ */
+void httpIndexController () {
+  server.send(200, "application/json", "Hello");
+}
+
+/**
+ * HTTP API for onboard led control
+ */
+void httpOnboardLedsController () {
+  int led1 = -1;
+  int led2 = -1;
+
+  // Parse args
+  for (uint8_t i = 0; i < server.args(); ++i) {
+    if (server.argName(i) == "led1") {
+      led1 = server.arg(i).toInt();
+    } else if ( server.argName(i) == "led2") {
+      led2 = server.arg(i).toInt();
+    }
+  }
+
+  // LED 1
+  if (led1 == -1) led1 = getLed1();
+  else setLed1(led1);
+
+  // LED 2
+  if (led2 == -1) led2 = getLed2();
+  else setLed2(led2);
+
+  // JSON response
+  StaticJsonBuffer<JSON_OBJECT_SIZE(2)> jsonBuffer;
+  JsonObject& json = jsonBuffer.createObject();
+  json["led1"] = led1;
+  json["led2"] = led2;
+  String response;
+  json.prettyPrintTo(response);
+
+  server.send(200, "application/json", response);
+}
+
+/**
+ * HTTP API for CIE 1976 UCS color coordinates
+ */
+void httpCie1976UcsController () {
+  float L = -1, u = -1, v = -1;
+  // Parse args
+  for (uint8_t i = 0; i < server.args(); ++i) {
+    if (server.argName(i) == "L") {
+      L = server.arg(i).toFloat();
+    } else if (server.argName(i) == "u") {
+      u = server.arg(i).toFloat();
+    } else if (server.argName(i) == "v") {
+      v = server.arg(i).toFloat();
+    }
+  }
+
+  int httpStatus = 200;
+
+  // All or none of the parameters must be missing
+  if (L > 0 && u > 0 && v > 0) {
+    // All parameters given -> set new color
+    Cie1976Ucs luv = {L, u, v};
+    setCie1976Ucs(luv);
+
+  } else if (L < 0 && u < 0 && v < 0) {
+    // None of the parameters given -> read existing color
+    Cie1976Ucs luv = getCie1976Ucs();
+    L = luv.L;
+    u = luv.u;
+    v = luv.v;
+
+  } else {
+    // Some of the parameters missing -> invalid request
+    httpStatus = 400;
+  }
+
+  // JSON response
+  StaticJsonBuffer<60> jsonBuffer;
+  JsonObject& json = jsonBuffer.createObject();
+  json["L"] = L;
+  json["u"] = u;
+  json["v"] = v;
+  String response;
+  json.prettyPrintTo(response);
+
+  // Send response
+  server.send(httpStatus, "application/json", response);
+}
+
+/**
+ * HTTP API for raw PWM values
+ */
+void httpRawController () {
+  float R = -1, G = -1, B = -1;
+
+  // Parse args
+  for (uint8_t i = 0; i < server.args(); ++i) {
+    if (server.argName(i) == "R") {
+      R = server.arg(i).toFloat();
+    } else if (server.argName(i) == "G") {
+      G = server.arg(i).toFloat();
+    } else if (server.argName(i) == "B") {
+      B = server.arg(i).toFloat();
+    }
+  }
+
+  int httpStatus = 200;
+
+  // All or none of the parameters must be missing
+  if (R > 0 && G > 0 && B > 0) {
+    // All parameters given -> set new color
+    RGB raw = {R, G, B};
+    setRaw(raw);
+
+  } else if (R < 0 && G < 0 && B < 0) {
+    // None of the parameters given -> read existing color
+    RGB raw = getRaw();
+    R = raw.R;
+    G = raw.G;
+    B = raw.B;
+
+  } else {
+    // Some of the parameters missing -> invalid request
+    httpStatus = 400;
+  }
+
+  // JSON response
+  StaticJsonBuffer<60> jsonBuffer;
+  JsonObject& json = jsonBuffer.createObject();
+  json["R"] = R;
+  json["G"] = G;
+  json["B"] = B;
+  String response;
+  json.prettyPrintTo(response);
+
+  // Send response
+  server.send(httpStatus, "application/json", response);
+}
+
+void httpNotFoundController () {
+  server.send(404, "text/plain", "404");
+}
+
+void setup(void){
+  analogWriteRange(pwmRange_);
+
+  pinMode(led1Pin_, OUTPUT); digitalWrite(led1Pin_, HIGH);
+  pinMode(led2Pin_, OUTPUT); digitalWrite(led2Pin_, HIGH);
+  pinMode(redPin_, OUTPUT); analogWrite(redPin_, 0);
+  pinMode(greenPin_, OUTPUT); analogWrite(greenPin_, 0);
+  pinMode(bluePin_, OUTPUT); analogWrite(bluePin_, 0);
+  pinMode(w1Pin_, OUTPUT); analogWrite(w1Pin_, 0);
+  pinMode(w2Pin_, OUTPUT); analogWrite(w2Pin_, 0);
+
+  Serial.begin(115200);
+
+  //WiFi.begin(ssid, password);
+
+  /*while (WiFi.status() != WL_CONNECTED) {
+    delay(500);
+  }*/
+
+  // Set onboard leds on as a sign for AP mode
+  setLed1(true);
+  setLed2(true);
+
+  // Autoconnect to latest WiFi or create cofiguration portal if cannot connect as a client
+  WiFiManager wiFiManager;
+  //wiFiManager.resetSettings();
+  wiFiManager.autoConnect("esp8277", "esp8266password");
+  Serial.print("Connected with IP: ");
+  Serial.println(WiFi.localIP());
+
+  // Set onboard leds off as a sign for STA mode
+  setLed1(false);
+  setLed2(false);
+
+  // Start Multicast domain name service
+  //MDNS.begin("esp8266");
+
+  // Routes
+  server.on("/", httpIndexController);
+  server.on("/onboardLeds", httpOnboardLedsController);
+  server.on("/raw", httpRawController);
+  server.on("/cie1976Ucs", httpCie1976UcsController);
+  //server.on("/srgb", httpSrgbController);
+
+  // Route not found
+  server.onNotFound(httpNotFoundController);
+
+  // Start listening
+  server.begin();
+}
+
+void loop(void){
+  server.handleClient();
+}


rotating on spot example

rotating on spot example

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

--- examples/Car/rotateOnSpot/rotateOnSpot.ino
+++ examples/Car/rotateOnSpot/rotateOnSpot.ino
@@ -0,0 +1,33 @@
+#include <Smartcar.h>
+#include <Wire.h>
+
+Gyroscope gyro;
+Car car(Car::INVERTED);
+int motorSpeed = 200;
+
+void setup() {
+  gyro.attach();
+  car.begin(gyro);
+  rotateOnSpot(90); //rotate clockwise 90 degrees on spot
+  delay(1000);
+  rotateOnSpot(-90); //rotate counter clockwise 90 degrees on spot
+}
+
+void loop() {
+}
+
+void rotateOnSpot(int targetDegrees){
+  if (!targetDegrees) return; //if the target degrees is 0, don't bother doing anything
+  gyro.begin(); //initiate the measurement
+  /* Let's set opposite speed on each side of the car, so it rotates on spot */
+  if (targetDegrees > 0){ //positive value means we should rotate clockwise
+    car.setMotorSpeed(motorSpeed, -motorSpeed); // left motors spin forward, right motors spin backward
+  }else{ //rotate counter clockwise
+    car.setMotorSpeed(-motorSpeed, motorSpeed); // left motors spin backward, right motors spin forward
+  }
+  while (abs(gyro.getAngularDisplacement()) <= abs(targetDegrees)){ //while we have not reached the desired degrees
+    gyro.update(); //update the gyro readings
+  }
+  car.stop(); //we have reached the target, so stop the car
+}
+


New program to set the shutters to their proper position

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


added DC motor sketch

added DC motor sketch

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

--- dcMotor/dcMotor.ino
+++ dcMotor/dcMotor.ino
@@ -0,0 +1,72 @@
+const int motorPin = 9;
+
+void setup() {
+  pinMode(motorPin, OUTPUT);
+
+  Serial.begin(9600);
+}
+
+void loop() {
+  //serialSpeed();
+  motorOnThenOff();
+  //motorOnThenOffWithSpeed();
+  //motorAcceleration();
+}
+
+void serialSpeed() {
+  int speed;
+
+  Serial.println("Type a speed (0-255) into the box above,");
+  Serial.println("then click [send] or press [return]");
+  Serial.println();
+
+  while(true) {
+    while (Serial.available() > 0) {
+      speed = Serial.parseInt();
+      speed = constrain(speed, 0, 255);
+
+      Serial.print("Setting speed to ");
+      Serial.println(speed);
+
+      analogWrite(motorPin, speed);
+    }
+  }
+}
+
+void motorOnThenOff() {
+  int onTime = 3000;
+  int offTime = 3000;
+
+  digitalWrite(motorPin, HIGH);
+  delay(onTime);
+  digitalWrite(motorPin, LOW);
+  delay(offTime);
+}
+
+void motorOnThenOffWithSpeed() {
+  int Speed1 = 225;
+  int Time1 = 3000;
+
+  int Speed2 = 125;
+  int Time2 = 3000;
+
+  analogWrite(motorPin, Speed1);
+  delay(Time1);
+  analogWrite(motorPin, Speed2);
+  delay(Time2);
+}
+
+void motorAcceleration() {
+  int speed;
+  int delayTime = 20;
+
+  for(speed = 0; speed <= 255; speed++) {
+    analogWrite(motorPin, speed);
+    delay(delayTime);
+  }
+
+  for(speed = 255; speed >= 0; speed--) {
+    analogWrite(motorPin, speed);
+    delay(delayTime);
+  }
+}


Add old ping code

Add old ping code

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

--- DistanceKeeper/DistanceKeeper.ino
+++ DistanceKeeper/DistanceKeeper.ino
@@ -0,0 +1,24 @@
+// ---------------------------------------------------------------------------
+// Example NewPing library sketch that does a ping about 20 times per second.
+// ---------------------------------------------------------------------------
+
+#include <NewPing.h>
+
+#define TRIGGER_PIN  7  // Arduino pin tied to trigger pin on the ultrasonic sensor.
+#define ECHO_PIN     8  // Arduino pin tied to echo pin on the ultrasonic sensor.
+#define MAX_DISTANCE 400 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.
+
+NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.
+
+void setup() {
+  Serial.begin(115200); // Open serial monitor at 115200 baud to see ping results.
+}
+
+void loop() {
+  delay(100);                      // Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings.
+  unsigned int uS = sonar.ping(); // Send ping, get ping time in microseconds (uS).
+  unsigned int cm = uS / US_ROUNDTRIP_CM;
+  if (cm < 80 && cm != 0) {
+    Serial.println("HERE");
+  }
+}