simple server that checks the connection state, if the connection is lost then the server is reinitialized

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

--- drone/SimpleServer/SimpleServer.ino
+++ drone/SimpleServer/SimpleServer.ino
@@ -0,0 +1,88 @@
+/*
+ * A simple sketch that uses WiServer to serve a web page
+ */
+
+#include <WiShield.h>
+#include <WiServer.h>
+
+#define WIRELESS_MODE_INFRA	1
+#define WIRELESS_MODE_ADHOC	2
+// #define DEBUG 1
+
+// Wireless configuration parameters ----------------------------------------
+unsigned char local_ip[] = {192,168,16,110};	// IP address of WiShield
+unsigned char gateway_ip[] = {192,168,16,254};	// router or gateway IP address
+unsigned char subnet_mask[] = {255,255,255,0};	// subnet mask for the local network
+const prog_char ssid[] PROGMEM = {"MP01"};		// max 32 bytes
+
+unsigned char security_type = 0;	// 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
+
+// WPA/WPA2 passphrase
+const prog_char security_passphrase[] PROGMEM = {"abc"};	// max 64 characters
+
+// WEP 128-bit keys
+// sample HEX keys
+prog_uchar wep_keys[] PROGMEM = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,	// Key 0
+				  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,	// Key 1
+				  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,	// Key 2
+				  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00	// Key 3
+				};
+
+// setup the wireless mode
+// infrastructure - connect to AP
+// adhoc - connect to another WiFi device
+unsigned char wireless_mode = WIRELESS_MODE_INFRA;
+
+unsigned char ssid_len;
+unsigned char security_passphrase_len;
+// End of wireless configuration parameters ----------------------------------------
+
+
+// This is our page serving function that generates web pages
+boolean sendMyPage(char* URL) {
+
+    // Check if the requested URL matches "/"
+    if (strcmp(URL, "/") == 0) {
+        // Use WiServer's print and println functions to write out the page content
+        WiServer.print("<html>");
+        WiServer.print("Hello World!");
+        WiServer.print("</html>");
+
+        // URL was recognized
+        return true;
+    }
+    // URL not found
+    return false;
+}
+
+
+void setup() {
+  WiServer.enableVerboseMode(true);
+
+  // Enable Serial output and ask WiServer to generate log messages (optional)
+  Serial.begin(57600);
+
+  // Initialize WiServer and have it use the sendMyPage function to serve pages
+  WiServer.init(sendMyPage);
+}
+
+U8 state = 0;
+
+void loop(){
+  // Run WiServer
+
+  U8 newState = WiServer.getConnectionState();
+
+  if(newState != state) {
+    state = newState;
+  }
+
+  if(!state) {
+    WiServer.init(sendMyPage);
+  }
+
+  WiServer.server_task();
+
+  delay(10);
+}
+


Finish Arduino-end code

Finish Arduino-end code

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

--- Arduino/ArduinoBluetoothMusicPlayer/ArduinoBluetoothMusicPlayer.ino
+++ Arduino/ArduinoBluetoothMusicPlayer/ArduinoBluetoothMusicPlayer.ino
@@ -0,0 +1,71 @@
+#include <SD.h>
+#include <SPI.h>
+#include <MusicPlayer.h>
+
+typedef enum {
+  MP_PLAY = 'a',
+  MP_PAUSE,
+  MP_BACKWARD,
+  MP_FORWARD,
+  MP_PREV,
+  MP_NEXT,
+  MP_VOL_UP,
+  MP_VOL_DOWN,
+  MP_MODE_NORMAL,
+  MP_MODE_SHUFFLE,
+  MP_MODE_LIST,
+  MP_MODE_SINGLE
+} MPCommand;
+
+void setup() {
+  Serial.begin(115200);
+  player.begin();
+  player.setPlayMode(PM_NORMAL_PLAY);
+  player.scanAndPlayAll();
+}
+
+void loop() {
+  if (Serial.available()) {
+    MPCommand cmd = (MPCommand)Serial.read();
+    Serial.write(cmd);
+    switch (cmd) {
+    case MP_PLAY:
+      player.opResume();
+      break;
+    case MP_PAUSE:
+      player.opPause();
+      break;
+    case MP_BACKWARD:
+      player.opFastRewind();
+      break;
+    case MP_FORWARD:
+      player.opFastForward();
+      break;
+    case MP_PREV:
+      player.opPreviousSong();
+      break;
+    case MP_NEXT:
+      player.opNextSong();
+      break;
+    case MP_VOL_UP:
+      player.opVolumeUp();
+      break;
+    case MP_VOL_DOWN:
+      player.opVolumeDown();
+      break;
+    case MP_MODE_NORMAL:
+      player.setPlayMode(PM_NORMAL_PLAY);
+      break;
+    case MP_MODE_SHUFFLE:
+      player.setPlayMode(PM_SHUFFLE_PLAY);
+      break;
+    case MP_MODE_LIST:
+      player.setPlayMode(PM_REPEAT_LIST);
+      break;
+    case MP_MODE_SINGLE:
+      player.setPlayMode(PM_REPEAT_ONE);
+      break;
+    }
+  }
+  player.play();
+}


Create Alfa.ino

Create Alfa.ino

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

--- src/Alfa.ino
+++ src/Alfa.ino
@@ -0,0 +1,61 @@
+#include <SPI.h>
+#include <Ethernet.h>
+#include <Twitter.h>
+
+// Alter IP address to suit your own network!
+byte mac[] = {   0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; // create MAC address for ethernet shield
+byte ip[] = {   192, 168, 0, 8}; // choose your own IP for ethernet shield
+Twitter twitter("1330657854-1lsI6hP3qGuy0hVKpaDm6hK7DM9B5OS3f3J7RrH"); // replace aaaaaaa with your token
+
+void setup()
+{
+  delay(1000);
+
+  if (!Ethernet.begin(mac))  // Try to connect using DHCP
+    Ethernet.begin(mac, ip); // Try to connect using a Static IP address.
+  delay(100);
+
+  Serial.begin(9600);
+  delay(100);
+
+  Serial.print(F("Connected to IP address: "));  // Print out the IP address.
+  for (int i = 0; i < 4; i++)
+    {
+      Serial.print(Ethernet.localIP()[i], DEC);
+      Serial.print(".");
+    }
+  Serial.println();
+  Serial.println();
+}
+
+void tweet(char msg[])
+{
+  Serial.println("connecting ...");
+  if (twitter.post(msg))
+  {
+    // Specify &Serial to output received response to Serial.
+    // If no output is required, you can just omit the argument, e.g.
+    // int status = twitter.wait();
+    int status = twitter.wait(&Serial);
+    if (status == 200)
+    {
+      Serial.println("OK.");
+    }
+    else
+    {
+      Serial.print("failed : code ");
+      Serial.println(status);
+    }
+  }
+  else
+  {
+    Serial.println("connection failed.");
+  }
+}
+
+void loop()
+{
+  delay(1000);
+  tweet("Purple monkey dishwasher");
+  do{} while(1>0); // endless loop
+}


added forward function

added forward function

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


separate chord and pattern choosing

separate chord and pattern choosing

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/andydrop/klampfinator.git/'


Create ADB_ESP8266_webServer.ino

Create ADB_ESP8266_webServer.ino

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

--- ADB_ESP8266_webServer.ino
+++ ADB_ESP8266_webServer.ino
@@ -0,0 +1,131 @@
+#include <ESP8266WiFi.h>
+#include <WiFiClient.h>
+#include <ESP8266WebServer.h>
+
+extern "C" {
+  #include <user_interface.h>
+}
+
+#define RELAY_Pin D1
+#define LED_Pin 2
+#define WLAN_SSID       "ESPap"
+#define WLAN_PASS       "thereisnospoon"
+
+struct softap_config config;
+uint8_t monitoringMAC1[6] = {0x34 , 0xD2, 0x70, 0x1A, 0x80, 0x15};
+boolean detectingMAC1 = false;
+int detectInterval = 8000; //msec
+unsigned long lastDetectedMillis = 0;
+
+ESP8266WebServer server(80);
+
+void ICACHE_FLASH_ATTR wifi_handle_event_cb(System_Event_t *evt) {
+  if (evt->event != EVENT_SOFTAPMODE_PROBEREQRECVED) {
+    return;
+    }
+
+  uint8_t* mac = evt->event_info.ap_probereqrecved.mac;
+  if (memcmp(mac, monitoringMAC1, 6) == 0 && detectInterval < (millis() - lastDetectedMillis)) {
+    lastDetectedMillis = millis();
+    detectingMAC1 = true;
+    }
+}
+
+
+void setup() {
+  delay(1000);
+  Serial.begin(115200);
+  Serial.println();
+  Serial.print("Configuring access point...");
+  connectWiFi();
+  initializePage();
+  server.on("/", initializePage);
+  server.on("/RELE", webOnOff);
+  server.begin();
+  Serial.println("HTTP server started");
+}
+
+void loop() {
+  server.handleClient();
+  if (detectingMAC1) {
+    webOnOff();
+  }
+}
+
+void connectWiFi() {
+  WiFi.disconnect();
+  delay(10);
+  WiFi.begin(WLAN_SSID, WLAN_PASS);
+  delay(100);
+  Serial.print("\nConnecting to ");
+  Serial.print(WLAN_SSID);
+  // Wait for connection
+  int i = 0;
+  while (WiFi.status() != WL_CONNECTED && i++ <= 10) {//wait 10 seconds
+    Serial.print(".");
+    delay(1000);
+  }
+  if (i == 11) {
+    Serial.print("\nCould not connect to network...");
+    while (1) delay(500);
+  }
+  Serial.print("\nConnected to IP address: ");
+  Serial.println(WiFi.softAPIP());
+  wifi_set_event_handler_cb(wifi_handle_event_cb);
+}
+
+
+void initializePage() {
+  updateHTML(checkClient());
+}
+
+String checkClient() {
+  WiFiClient clientConnected = server.client();
+  String ipClient = clientConnected.remoteIP().toString();
+  return ipClient;
+}
+
+//Aggiorna la pagina del webserver
+void updateHTML(String IP) {
+  pinMode(RELAY_Pin, OUTPUT);
+  String webpage = "";
+  webpage += "

MiniServer ESP8266

";
+
+  webpage += "
Client connected :
";
+  webpage +=  IP;
+
+  webpage += "

RELE Status
";
+  webpage += "RELE has been switched : " + String((digitalRead(RELAY_Pin) == HIGH) ? "ON" : "OFF");
+  webpage += "

";
+  webpage += "<input type=\"button\" value=\"RELE " + String((digitalRead(RELAY_Pin) == HIGH) ? "ON" : "OFF") + " \" + onclick=\"window.location.href=\'/RELE\'\">";
+
+  webpage += "
";
+
+  server.send(200, "text/html", webpage);
+  delay(1000);
+}
+
+
+void initializePins() {
+  pinMode(LED_Pin, OUTPUT);
+  pinMode(RELAY_Pin, OUTPUT);
+
+  digitalWrite(LED_Pin, HIGH);   // turn off LED with voltage HIGH
+  digitalWrite(RELAY_Pin, LOW);  // turn off relay with voltage LOW
+}
+
+//Gestione degli eventi quando si accede dalla pagina web
+void webOnOff() {
+  String requestUrl = server.uri();
+  Serial.println("Connected client: " + checkClient());
+  updateHTML(checkClient());
+  if (requestUrl.indexOf("RELE") != -1 || detectingMAC1) {
+    pinMode(RELAY_Pin, OUTPUT);
+    pinMode(LED_Pin, OUTPUT);
+    digitalWrite(RELAY_Pin, !digitalRead(RELAY_Pin));
+    digitalWrite(LED_Pin, !digitalRead(LED_Pin));
+    Serial.println("Switched ON/OFF");
+    detectingMAC1 = false;
+  }
+  initializePage();
+}


Added controller firmware

Added controller firmware

Tested working; refresh rate is 50ms.

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

--- Controller/Controller.ino
+++ Controller/Controller.ino
@@ -0,0 +1,194 @@
+/*
+ * Title: Controller
+ *
+ * Author: EEJeffMan
+ *
+ * Description: Receiving control command from joystick, encoding it into a byte and sending it to Xbee via UART (software serial)
+ *
+ *    Hardware:
+ *        Controller: Arduino pro 328 3.3V
+ *        Sparkfun xbee shield
+ *        Prallax analog joystick soldered to xbee shield
+ *        Xbee series 1
+ *        400mAh LiPO battery
+ *
+ *    Connections:
+ *        Left/right joystick output: A0
+ *        Up/down joystick output: A1
+ *        Data out to xbee: D3
+ *
+ *    NOTE: switch on xbee shield should be in the position "DLINE" instead of "UART".
+ *
+ *    NOTE: Originally created 1/14/13
+ *
+ */
+
+ #include <SoftwareSerial.h>
+
+ #define		LeftTurnThreshold		350//150
+ #define		RightTurnThreshold		650//450
+ #define		BackThreshold			350//150
+ #define		ForwardThreshold		650//450
+ #define       Xpin     0//5
+ #define       Ypin     1//4
+ #define       TXpin    3
+ #define       RXpin    2
+
+ #define    ForwardOnly    8
+ #define    ForwardLeft    9
+ #define    ForwardRight   10
+ #define    LeftOnly       1
+ #define    RightOnly      2
+ #define    BackLeft       5
+ #define    BackRight      6
+ #define    BackOnly       4
+ #define    None           0
+
+ struct OUTPUT_BITS{
+     unsigned Left		:1;
+     unsigned Right		:1;
+     unsigned Back		:1;
+     unsigned Forward	:1;
+     unsigned			:4;
+ };
+union OUTPUTS{
+    int All;
+    struct OUTPUT_BITS bits;
+ };
+
+/*
+1 = Left
+2= Right
+3= N/A
+4= Back
+5=Back Left
+6= Back Right
+7= N/A
+8= Forward
+9 = Forward Left
+10 = Forward Right
+11 = N/A
+*/
+
+union OUTPUTS Outputs;
+
+unsigned int Xnum,Ynum;
+unsigned MoveMode = 0;
+unsigned PrevMode = 0;
+
+SoftwareSerial mySerial(RXpin, TXpin);
+
+void setup()
+{
+  mySerial.begin(9600);
+  Serial.begin(9600);
+}
+
+void loop()
+{
+
+  while(1)
+  {
+
+    delay(50);
+    digitalWrite(13, true); // Flash a light to show signs of life
+    Xnum = analogRead(Xpin);
+    Ynum = analogRead(Ypin);
+
+    PrevMode = Outputs.All;
+
+    //assumes voltages are low to the left and down on the joystick...
+    if(Xnum < LeftTurnThreshold)
+    {
+        Outputs.bits.Left = 1;
+        Outputs.bits.Right = 0;
+    }
+    else
+    {
+        Outputs.bits.Left = 0;
+    }
+    if(Xnum > RightTurnThreshold)
+    {
+        Outputs.bits.Right = 1;
+        Outputs.bits.Left = 0;
+    }
+    else
+    {
+        Outputs.bits.Right = 0;
+    }
+    if(Ynum < BackThreshold)
+    {
+        Outputs.bits.Back = 1;
+        Outputs.bits.Forward = 0;
+    }
+    else
+    {
+        Outputs.bits.Back = 0;
+    }
+    if(Ynum > ForwardThreshold)
+    {
+        Outputs.bits.Forward = 1;
+        Outputs.bits.Back = 0;
+    }
+    else
+    {
+        Outputs.bits.Forward = 0;
+    }
+
+    MoveMode = Outputs.All;
+
+    //debugging
+    //Serial.print("Output=");
+    //Serial.println(Outputs.All);
+
+  //  if(!(MoveMode == PrevMode))
+    //{
+      //Serial.println(Outputs.All);
+      mySerial.write(Outputs.All+48);
+          Serial.print("X=");
+    Serial.println(Xnum);
+    Serial.print("Y=");
+    Serial.println(Ynum);
+      Serial.print("Output=");
+
+      switch(Outputs.All)
+      {
+          case None:
+            Serial.println("None");
+            break;
+          case ForwardOnly:
+            Serial.println("Forward");
+            break;
+          case ForwardLeft:
+            Serial.println("Forward Left");
+            break;
+          case ForwardRight:
+            Serial.println("Forward Right");
+            break;
+          case LeftOnly:
+            Serial.println("Left");
+            break;
+          case RightOnly:
+            Serial.println("Right");
+            break;
+          case BackLeft:
+            Serial.println("Back Left");
+            break;
+          case BackRight:
+            Serial.println("Back Right");
+            break;
+          case BackOnly:
+            Serial.println("Back");
+            break;
+          default:
+            Serial.println("Error");
+            break;
+      }
+    //}
+
+	//mySerial.write(Outputs.All+48);
+
+    digitalWrite(13, false); // Flash a light to show signs of life
+
+  }
+}


Initial Commit

Initial Commit

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

--- vibe_watch_v2.ino
+++ vibe_watch_v2.ino
@@ -0,0 +1,84 @@
+#include <NewPing.h>
+#include <RunningMedian.h>
+
+//Define the pins for the ultrasonic sensor's echo and trigger pins
+#define DISTANCE_ECHO 3
+#define DISTANCE_TRIGGER 2
+#define MAX_ULTRASONIC_DISTANCE 500
+#define M1 6
+
+NewPing sonar(DISTANCE_TRIGGER, DISTANCE_ECHO, MAX_ULTRASONIC_DISTANCE);
+
+int getDistanceFromUltrasonicSensor(){
+  //Create an instance of the RunningMedian class with the number of samples to use
+  RunningMedian samples = RunningMedian(7);
+
+  //Get the 7 samples
+  for(int i= 0; i<5; i++){
+      delay(50);
+      int pingVal = sonar.ping();
+
+      int distance = pingVal / US_ROUNDTRIP_CM;
+      if(distance == 0){
+        distance = 3000;
+      }
+     samples.add(distance);
+   }
+   //Return the median value
+   return samples.getMedian();
+}
+
+
+void setup()
+{
+    //Initialize serial communication to send the distance value  to the serial monitor
+    Serial.begin(9600);
+        pinMode(6, OUTPUT);
+
+}
+
+void loop()
+{
+  int distance_cm;
+  distance_cm = getDistanceFromUltrasonicSensor();
+
+  Serial.print(distance_cm);
+  Serial.print("cm");
+  Serial.println();
+
+   if (distance_cm < 40)
+       {
+          lt_100();
+       }
+
+       else if(distance_cm < 100)
+       {
+          lt_200();
+       }
+
+       else; // if there's nothing in front of us
+       {
+          nothing();
+       }
+}
+
+
+
+void lt_100() {
+  digitalWrite(M1,HIGH);
+  delay(70);
+  digitalWrite(M1,LOW);
+  delay(35);
+}
+
+void lt_200() {
+  digitalWrite(M1,HIGH);
+  delay(70);
+  digitalWrite(M1,LOW);
+  delay(180);
+}
+
+void nothing() {
+  digitalWrite(M1,LOW);
+  delay(100);
+}


Create led.ino

Create led.ino

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

--- led.ino
+++ led.ino
@@ -0,0 +1,32 @@
+/*Implementación de un sistema multitarea
+Metodología:
+Loop infinito
+Llamado consecutivo de tareas (funciones "run")
+Cambio de contexto por interrupción
+*/
+
+#include "led.h"
+
+void setup(){
+  Serial.begin(9600);
+  // tareaBegin();
+  ledBegin(13);
+}
+
+void loop(){
+  // tareaRun();
+  ledRun();
+}
+
+void serialEvent(){
+  switch(Serial.read()){
+    case 'A':
+      ledOn();
+      break;
+    case 'B':
+      ledOff();
+      break;
+    default:
+      break;
+  }
+}


Added files via upload

Added files via upload

First version working.

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

--- FunkyFellow1_1.ino
+++ FunkyFellow1_1.ino
@@ -0,0 +1,449 @@
+/*
+FunkyFellow1_1.ino
+Filter effect using state variable filters.
+Thanks to Paul Stoffregen, www.PJRC.com, that made the great audio library fro Teensy! Plus all the other great stuff!
+This code can be loaded into a Teensy3.1/3.2 with a Audio sheild. Use a I2C 64x128 OLED screen to show the graphics.
+All in all use the OpenEffectsBox from OnkartGromt.
+ */
+#include <EEPROM.h>
+#include <Bounce.h>
+#include <Audio.h>
+#include <Wire.h>
+#include <SPI.h>
+#include <SD.h>
+#include <SerialFlash.h>
+#include <Adafruit_GFX.h>
+#include <Adafruit_SSD1306.h>
+
+#define OLED_RESET 4
+Adafruit_SSD1306 display(OLED_RESET);
+
+// GUItool: begin automatically generated code
+AudioSynthWaveform       waveform1;      //xy=106,573
+AudioSynthWaveformDc     dc1;            //xy=109,473
+AudioInputI2S            i2s1;           //xy=140,314
+AudioSynthWaveformDc     dc2;            //xy=140.88888549804688,358.8888854980469
+AudioEffectMultiply      multiply2;      //xy=248,532
+AudioAnalyzePeak         peak3;          //xy=254,573
+AudioEffectMultiply      multiply3;      //xy=298.8888854980469,313.8888854980469
+AudioMixer4              mixer3;         //xy=393,492
+AudioFilterStateVariable filter1;        //xy=456,147
+AudioEffectMultiply      multiply1;      //xy=495,420
+AudioAnalyzePeak         peak1;          //xy=673,420
+AudioFilterStateVariable filter2;        //xy=759,151
+AudioFilterStateVariable filter3;        //xy=759,204
+AudioFilterStateVariable filter4;        //xy=759,257
+AudioMixer4              mixer2;         //xy=911,78
+AudioMixer4              mixer1;         //xy=911,216
+AudioMixer4              mixer4;         //xy=1187,295
+AudioAnalyzeFFT1024      fft1024_1;      //xy=1385,389
+AudioAnalyzePeak         peak2;          //xy=1394,297
+AudioOutputI2S           i2s2;           //xy=1394,342
+AudioConnection          patchCord1(waveform1, 0, multiply2, 1);
+AudioConnection          patchCord2(waveform1, peak3);
+AudioConnection          patchCord3(dc1, 0, multiply2, 0);
+AudioConnection          patchCord4(dc1, 0, mixer3, 0);
+AudioConnection          patchCord5(i2s1, 0, multiply3, 0);
+AudioConnection          patchCord6(dc2, 0, multiply3, 1);
+AudioConnection          patchCord7(multiply2, 0, mixer3, 1);
+AudioConnection          patchCord8(multiply3, 0, multiply1, 0);
+AudioConnection          patchCord9(multiply3, 0, filter1, 0);
+AudioConnection          patchCord10(multiply3, fft1024_1);
+AudioConnection          patchCord11(multiply3, 0, mixer4, 3);
+AudioConnection          patchCord12(mixer3, 0, multiply1, 1);
+AudioConnection          patchCord13(filter1, 0, filter2, 0);
+AudioConnection          patchCord14(filter1, 0, mixer2, 0);
+AudioConnection          patchCord15(filter1, 1, filter3, 0);
+AudioConnection          patchCord16(filter1, 1, mixer2, 1);
+AudioConnection          patchCord17(filter1, 2, filter4, 0);
+AudioConnection          patchCord18(filter1, 2, mixer2, 2);
+AudioConnection          patchCord19(multiply1, peak1);
+AudioConnection          patchCord20(multiply1, 0, filter1, 1);
+AudioConnection          patchCord21(multiply1, 0, filter2, 1);
+AudioConnection          patchCord22(multiply1, 0, filter3, 1);
+AudioConnection          patchCord23(multiply1, 0, filter4, 1);
+AudioConnection          patchCord24(filter2, 0, mixer1, 0);
+AudioConnection          patchCord25(filter3, 1, mixer1, 1);
+AudioConnection          patchCord26(filter4, 2, mixer1, 2);
+AudioConnection          patchCord27(mixer2, 0, mixer4, 0);
+AudioConnection          patchCord28(mixer1, 0, mixer4, 1);
+AudioConnection          patchCord29(mixer4, peak2);
+AudioConnection          patchCord30(mixer4, 0, i2s2, 0);
+AudioConnection          patchCord31(mixer4, 0, i2s2, 1);
+AudioControlSGTL5000     sgtl5000_1;     //xy=662.0000305175781,536.0000305175781
+// GUItool: end automatically generated code
+
+//Pinout board rev1
+int Pot1 = A6;    // select the input pin for the potentiometer
+int Pot2 = A3;    // select the input pin for the potentiometer
+int Pot3 = A2;    // select the input pin for the potentiometer
+int Pot4 = A1;    // select the input pin for the potentiometer
+int CV1 = A10;
+int CV2 = A11;
+
+int Tap1 = 0;
+int Tap2 = 1;
+
+int SW1 = A12;
+int SW2 = A13;
+
+int ledPin1 = 3;      // select the pin for the LEDonoff
+int ledPin2 = 4;      // select the pin for the LEDyellow
+int ledPin3 = 5;      // select the pin for the LEDmode/tap
+
+//Variables for values
+boolean Tap1Value = 0;
+boolean Tap2Value = 0;
+float Pot1Value = 0;
+float Pot2Value = 0;
+float Pot3Value = 0;
+float Pot4Value = 0;
+int SW1Value = 0;
+int SW2Value = 0;
+float CV1Value = 0;
+float CV2Value = 0;
+float Pot1ValueOld = 0;  // variable to store the previous value
+float Pot2ValueOld = 0;
+float Pot3ValueOld = 0;
+float Pot4ValueOld = 0;
+int SW1ValueOld = 0;
+int SW2ValueOld = 0;
+int Tap1ValueOld = 1;
+int Tap2ValueOld = 1;
+int CV1ValueOld = 0;
+int Tap1Timer = 0;
+int Tap2Timer = 0;
+float margin  = 0.1;
+int modulationMode = 0;
+boolean Tap2Pressed = 0;
+int filterOrder = 24;
+int GraphFreq = 0;
+float ffund = 0;
+
+// Variables
+int ledStateONOFF = LOW;         // the current state of the output pin
+int buttonState0;             // the current reading from the input pin
+int lastButtonState0 = LOW;   // the previous reading from the input pin
+int ledStateBOOST = LOW;         // the current state of the output pin
+int buttonState1;             // the current reading from the input pin
+int lastButtonState1 = LOW;   // the previous reading from the input pin
+
+unsigned long lastDebounceTime0 = 0;  // the last time the output pin was toggled
+unsigned long lastDebounceTime1 = 0;  // the last time the output pin was toggled
+unsigned long debounceDelay = 50;    // the debounce time; increase if the output flickers
+
+float peak = 0.0;
+float peak_2 = 0.0;
+float peak_3 =0.0;
+int spanfreq = 500;
+int offsetfreq = 201;
+int movingfreq = 500;
+int octave = 7;
+float level = 0.85;
+float modFreq = 3;
+float modFreqOld = 3;
+float InLevel = 0;
+
+const int myInput = AUDIO_INPUT_LINEIN;
+
+float mapfloat(float x, float in_min, float in_max, float out_min, float out_max)
+{
+  return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
+}
+Bounce OnOff = Bounce(Tap1, 30 );
+Bounce BoostOnOff = Bounce(Tap2, 30);
+
+void setup() {
+  AudioMemory(100);
+  InLevel = float(EEPROM.read(0)/255.0);
+  dc2.amplitude(1, 20);
+  sgtl5000_1.enable();  // Enable the audio shield
+  sgtl5000_1.inputSelect(myInput);
+  sgtl5000_1.volume(0.8);
+  sgtl5000_1.lineInLevel(5);   // 1,33Vp-p
+  sgtl5000_1.lineOutLevel(13); // 3.16Vp-p
+  fft1024_1.windowFunction(AudioWindowHanning1024);
+
+  pinMode(ledPin1, OUTPUT);
+  pinMode(ledPin2, OUTPUT);
+  pinMode(ledPin3, OUTPUT);
+  pinMode(Tap1, INPUT);
+  pinMode(Tap2, INPUT);
+  mixer3.gain(0, 1);
+  mixer3.gain(1, 0);
+  mixer4.gain(0, 0);
+  mixer4.gain(1, 0);
+  mixer4.gain(3, 1.65);
+  mixer1.gain(0, 1);    //24order filter
+  mixer1.gain(1, 1);
+  mixer1.gain(2, 1);
+  mixer1.gain(3, 0);
+  mixer2.gain(0, 1);    //12 order filter
+  mixer2.gain(1, 1);
+  mixer2.gain(2, 1);
+  mixer2.gain(3, 0);
+  sgtl5000_1.dacVolume (level);
+  sgtl5000_1.autoVolumeControl(2,0,0,0.7,50,100);  //maxGain,response,hard limit,threshold,attack, decay
+  sgtl5000_1.autoVolumeEnable();
+  Serial.begin(115200);
+  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3C (for the 128x64)
+  display.clearDisplay();
+  delay(100);
+}
+
+//Main loop
+void loop() {
+  OnOff.update();      //update the bounce
+  BoostOnOff.update();
+
+  // read the value from the sensor:
+  Pot1Value = analogRead(Pot1);    //Sense
+  Pot2Value = analogRead(Pot2);    //Resonance
+  Pot3Value = analogRead(Pot3);    //Freq
+  Pot4Value = analogRead(Pot4);    //Mode
+  Tap1Value = digitalRead(Tap1);   //On off
+  Tap2Value = digitalRead(Tap2);   //Mode/Tap
+  SW1Value = analogRead(SW1);      //Filter char
+  SW2Value = analogRead(SW2);      //Direction
+  CV1Value = analogRead(CV1);      //CV input
+  CV2Value = analogRead(CV2);      //EXP input
+
+  Pot1Value = mapfloat(Pot1Value, 0, 1023, 1, 0);        //Sense
+  Pot2Value = mapfloat(Pot2Value, 0, 1023, 2, 0.7);      //Resonance
+  GraphFreq = map(Pot3Value, 0, 1023, 90, 30);           //Moving point of Graph
+  Pot3Value = map(Pot3Value, 0, 1023, 1500, 150);        //Freq
+  Pot4Value = mapfloat(Pot4Value, 0, 1023, 10.0, 0.1);   //ModFreq
+  SW1Value = map(SW1Value, 0, 1023, 5, 0);               //Filter char
+  SW1Value = constrain(SW1Value, 1, 5);
+  SW2Value = map(SW2Value, 0, 1023, 5, 0);               //Direction
+  SW2Value = constrain(SW2Value, 1, 5);
+  CV1Value = map(CV1Value, 0, 1023, 10, 1);              //Octave CVinput
+  CV2Value = map(CV2Value, 0, 1023, 1500, 150);          //Freq expression pedal
+
+  buttonState0 = OnOff.read();
+  if (lastButtonState0 != buttonState0){
+      // only toggle the state if the new button state is HIGH
+      if (buttonState0 == LOW) {
+        ledStateONOFF = !ledStateONOFF;
+      }
+  }
+  buttonState1 = BoostOnOff.read();
+  if (lastButtonState1 != buttonState1){
+      // only toggle the state if the new button state is HIGH
+      if (buttonState1 == LOW) {
+        ledStateBOOST = !ledStateBOOST;
+      }
+  }
+
+    // set the outputs:
+  digitalWrite(ledPin1, ledStateONOFF);
+  lastButtonState0 = buttonState0;  //save readings to next round
+  lastButtonState1 = buttonState1;
+
+  //Sets the sense multiplication factor
+  if (SW2Value == 3)dc1.amplitude(Pot1Value);
+  else if (SW2Value == 5)dc1.amplitude(-Pot1Value);
+
+  //read the signal input peak
+  if (peak1.available())  peak = peak1.read();
+  if (peak2.available())  peak_2 = peak2.read();    //Output peak
+  if (peak3.available())  peak_3 = peak3.read();
+
+  if (modulationMode == 0){
+    analogWrite(ledPin2, peak_2*400);    //yellow LED
+    if (Pot4Value <= 5)filterOrder = 12;
+    else filterOrder = 24;
+    }
+  else analogWrite(ledPin2, (peak_3)*100);  //modulation active
+
+  if (CV1Value <1) octave = 6;  //Check if CVinput is active
+  else octave = CV1Value;
+
+  if (CV2Value <100) spanfreq = Pot3Value;  //Check if exp pedal is active
+  else spanfreq = CV2Value;
+
+  if (SW2Value == 3) movingfreq = peak*2 * spanfreq + spanfreq ;
+  if (SW2Value == 5) movingfreq = -peak *2* spanfreq + spanfreq ;
+  if (SW2Value == 1) movingfreq = spanfreq;    //not moving filter
+
+  filter1.frequency(movingfreq);
+  filter1.resonance(Pot2Value);
+  filter1.octaveControl(octave);
+  filter2.frequency(movingfreq);
+  filter2.resonance(Pot2Value);
+  filter2.octaveControl(octave);
+  filter3.frequency(movingfreq);
+  filter3.resonance(Pot2Value);
+  filter3.octaveControl(octave);
+  filter4.frequency(movingfreq);
+  filter4.resonance(Pot2Value);
+  filter4.octaveControl(octave);
+
+  waveform1.frequency(Pot4Value);
+
+if (!Tap2Value && (Tap2Value == Tap2ValueOld) && modulationMode == 0 && Tap2Pressed == 0){ //turn on modulation
+  Serial.print("TIME0\n");
+  Tap2Timer++;
+  if (Tap2Timer > 15){
+    mixer3.gain(0,0);
+    mixer3.gain(1,1);
+    modulationMode = 1;
+    analogWrite(ledPin2,255);
+    digitalWrite(ledPin3,HIGH);
+    Tap2Pressed = 1;
+  }
+}
+else if (!Tap2Value && (Tap2Value == Tap2ValueOld) && modulationMode == 1 && Tap2Pressed == 0){ //turn off modulation
+  Serial.print("TIME1\n");
+  Tap2Timer++;
+  if (Tap2Timer > 15){
+    mixer3.gain(0,1);
+    mixer3.gain(1,0);
+    modulationMode = 0;
+    analogWrite(ledPin2,255);
+    digitalWrite(ledPin3,LOW);
+    Tap2Pressed = 1;
+  }
+}
+else if (Tap2Value){
+  Tap2Timer = 0;
+  Tap2Pressed = 0;
+  }
+
+//BYPASS MODE
+  if (ledStateONOFF == 0){
+      mixer4.gain(0, 0);
+      mixer4.gain(1, 0);
+      mixer4.gain(2, 0);
+      mixer4.gain(3, 1.65);
+  }
+  else {
+      mixer4.gain(3, 0);  //Always turn off bypass signal
+    if (SW1Value == 3) {  //HP
+      if (filterOrder == 12) { //   12db/dec
+        mixer4.gain(0, 1.3);
+        mixer4.gain(1, 0);
+        mixer2.gain(0, 0);
+        mixer2.gain(1, 0);
+        mixer2.gain(2, 1);
+        }
+      else if (filterOrder == 24) {    //24db/dec
+        mixer4.gain(0, 0);
+        mixer4.gain(1, 1.3);
+        mixer1.gain(0, 0);
+        mixer1.gain(1, 0);
+        mixer1.gain(2, 1);
+      }
+    }
+    else if (SW1Value == 1) {  //BP
+       if (filterOrder == 12) { //   12db/dec
+        mixer4.gain(0, 1.3);
+        mixer4.gain(1, 0);
+        mixer2.gain(0, 0);
+        mixer2.gain(1, 1);
+        mixer2.gain(2, 0);
+        }
+      else if (filterOrder == 24) {    //24db/dec
+        mixer4.gain(0, 0);
+        mixer4.gain(1, 1.3);
+        mixer1.gain(0, 0);
+        mixer1.gain(1, 1);
+        mixer1.gain(2, 0);
+      }
+    }
+    else if (SW1Value == 5) { //LowPass
+       if (filterOrder == 12) { //   12db/dec
+        mixer4.gain(0, 1.3);
+        mixer4.gain(1, 0);
+        mixer2.gain(0, 1);
+        mixer2.gain(1, 0);
+        mixer2.gain(2, 0);
+        }
+      else if (filterOrder == 24) {    //24db/dec
+        mixer4.gain(0, 0);
+        mixer4.gain(1, 1.3);
+        mixer1.gain(0, 1);
+        mixer1.gain(1, 0);
+        mixer1.gain(2, 0);
+      }
+    }
+  }
+display.clearDisplay();
+if (!Tap1Value && (Tap1Value == Tap1ValueOld)){    //When Mode/tap is held down you can adjust the input gain of the input
+  Serial.print("TIME");
+  Tap1Timer++;
+  if (Tap1Timer > 15){
+    InLevel = analogRead(Pot1);
+    InLevel = mapfloat(InLevel,0,1023,1,0.2);
+    dc2.amplitude(InLevel,10);
+    delay(50);
+    EEPROM.write(0, InLevel*255);
+    analogWrite(ledPin2, 255);
+    //display.clearDisplay();
+    display.setTextSize(1);
+    display.setTextColor(WHITE);
+    display.setCursor(5, 10);
+    display.print("Input:");
+    display.print(InLevel);
+    display.display();
+  }
+}
+else if (Tap1Value){
+  Tap1Timer = 0;
+//  peak = peak1.read();   //read the signal output peak
+  if (peak == -1)(peak = 0);
+  analogWrite(ledPin2, peak*100);
+}
+if(fft1024_1.available()){        //Display FFT on screen
+ // display.clearDisplay();
+  for (int i=0; i<42; i++) {
+    float fft = fft1024_1.read(i)*512;
+    //Serial.print(fft);
+    //Serial.print(",");
+    display.drawLine(i*3, 64, i*3, 64-fft, WHITE);
+    display.drawLine(i*3+1, 64, i*3+1, 64-fft, WHITE);
+    display.drawLine(i*3+2, 64, i*3+2, 64-fft, WHITE);
+  }
+}
+//  display.clearDisplay();
+  GraphFreq = movingfreq/15;
+ if(SW1Value ==5){    //LP
+    display.drawLine(0, 32, GraphFreq-5, 32, WHITE);
+    display.drawLine(GraphFreq-5, 32, GraphFreq, 35-Pot2Value*4, WHITE);
+    display.drawLine(GraphFreq, 35-Pot2Value*4, GraphFreq+5, 32, WHITE);
+    display.drawLine(GraphFreq+5, 32, GraphFreq+(48-filterOrder), 64, WHITE);
+ }
+ else if(SW1Value == 3){    //HP
+    display.drawLine(128, 32, GraphFreq+5, 32, WHITE);
+    display.drawLine(GraphFreq+5, 32, GraphFreq, 35-Pot2Value*4, WHITE);
+    display.drawLine(GraphFreq, 35-Pot2Value*4, GraphFreq-5, 32, WHITE);
+    display.drawLine(GraphFreq-5, 32, GraphFreq-(48-filterOrder), 64, WHITE);
+ }
+  else {    //BP
+    display.drawLine(GraphFreq-(48-filterOrder), 64, GraphFreq-5, 32, WHITE);
+    display.drawLine(GraphFreq+5, 32, GraphFreq, 35-Pot2Value*4, WHITE);
+    display.drawLine(GraphFreq, 35-Pot2Value*4, GraphFreq-5, 32, WHITE);
+    display.drawLine(GraphFreq+5, 32, GraphFreq+(48-filterOrder), 64, WHITE);
+ }
+  display.setTextSize(1);
+  display.setTextColor(WHITE);
+  display.setCursor(80, 10);
+  display.print("fc:");
+  display.print(movingfreq);
+  display.display();
+
+   Serial.print(" InLevel: ");
+   Serial.print(InLevel);
+   Serial.print(" Filterorder: ");
+   Serial.println(filterOrder);
+
+   Pot1ValueOld = Pot1Value;
+   Pot2ValueOld = Pot2Value;
+   Pot3ValueOld = Pot3Value;
+   Pot4ValueOld = Pot4Value;
+   SW1ValueOld = SW1Value;
+   SW2ValueOld = SW2Value;
+   Tap1ValueOld = Tap1Value;
+   Tap2ValueOld = Tap2Value;
+   CV1ValueOld = CV1Value;
+}


코드 업로드(개발 버전)

코드 업로드(개발 버전)

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

--- RemotePat.ino
+++ RemotePat.ino
@@ -0,0 +1,79 @@
+#include <ESP8266WiFi.h>
+#include <WiFiClient.h>
+#include <ESP8266WebServer.h>
+#include <ESP8266mDNS.h>
+#include <Servo.h>
+
+Servo myservo;
+Servo myservo2;
+ESP8266WebServer server(80);
+String url = "https://raw.githubusercontent.com/SkyLightQP/RemotePetFood/master/index.html";
+
+void setup() {
+ // put your setup code here, to run once:
+  Serial.begin(115200);
+  myservo.attach(4); // D2
+  myservo2.attach(5); // D1
+  // 연결 완료 까지 대기
+  while (WiFi.status() != WL_CONNECTED) {
+    delay(500);
+    Serial.print(".");
+  }
+  Serial.println("");
+  Serial.print("Connected to ");
+  Serial.println(WiFi.SSID());
+  Serial.print("IP address: ");
+  Serial.println(WiFi.localIP());
+
+  if (MDNS.begin("esp8266")) {
+    Serial.println("MDNS responder started");
+  }
+
+  //접속별 동작 설정
+  server.on("/", [](){
+    sendHtml(url);
+  });
+  server.on("/open1", [](){
+    myservo.write(140);
+    sendHtml(url);
+  });
+  server.on("/close1", [](){
+    myservo.write(90);
+    sendHtml(url);
+  });
+  server.on("/auto1", [](){
+    myservo.write(140);
+    delay(600);
+    myservo.write(90);
+    sendHtml(url);
+  });
+   server.on("/open2", [](){
+    myservo2.write(140);
+    sendHtml(url);
+  });
+  server.on("/close2", [](){
+    myservo2.write(90);
+    sendHtml(url);
+  });
+  server.on("/auto2", [](){
+    myservo2.write(140);
+    delay(600);
+    myservo2.write(90);
+    sendHtml(url);
+  });
+  //서버 사용을 시작합니다.
+  server.begin();
+  Serial.println("HTTP server started");
+}
+
+void loop(void){
+  server.handleClient();//클라이언트 접속을 관리합니다.
+}
+
+void sendHtml(String url){
+  String html = "";
+  html += "";
+  html += "

";
+  html += "";
+   server.send(200, "text/html", html);
+}


housekeeping

housekeeping

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

--- Robolette.ino
+++ Robolette.ino
@@ -0,0 +1,22 @@
+/*
+  Control for the Arduino Uno BarBot.
+
+  Created by Aaron Roth on 5/6/2012.
+*/
+
+const int rightValve = 8;
+const int leftValve = 11;
+
+void setup() {
+ pinMode(8, OUTPUT);
+ pinMode(11, OUTPUT);
+}
+
+void loop() {
+  digitalWrite(rightValve, HIGH);
+  digitalWrite(leftValve, HIGH);
+  delay(1000);
+  digitalWrite(rightValve, LOW);
+  digitalWrite(leftValve, LOW);
+  delay(1000);
+}


removed arduboy.setFrameRate(60)

removed arduboy.setFrameRate(60)

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/SiNe-DeMo.git/'


Created the Basic_Test example.

Created the Basic_Test example.

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

--- examples/Basic_Test/Basic_Test.ino
+++ examples/Basic_Test/Basic_Test.ino
@@ -0,0 +1,34 @@
+#include <UniWS.h>
+
+#define NUM_LEDS 19
+
+UniWS strip(NUM_LEDS);
+
+void setup()
+{
+  strip.begin();
+  strip.show();               // turn LEDs off
+}
+
+void loop()
+{
+  uint8_t wait = 50;
+  uint8_t high = 255;
+  colorWipe(strip.color(high, 0, 0), wait); // Red
+  colorWipe(strip.color(0, 0, 0), wait);    // Black
+  colorWipe(strip.color(0, high, 0), wait); // Green
+  colorWipe(strip.color(0, 0, 0), wait);    // Black
+  colorWipe(strip.color(0, 0, high), wait); // Blue
+  colorWipe(strip.color(0, 0, 0), wait);    // Black
+  delay(500);
+};
+
+// Fill the dots one after the other with a color
+void colorWipe(uint32_t c, uint16_t wait)
+{
+  for (uint16_t i = 0; i < strip.numPixels(); i++) {
+    strip.setPixel(i, c);
+    strip.show();
+    delay(wait);
+  }
+}


main file :cat:

main file :cat:

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

--- dorm-leds.ino
+++ dorm-leds.ino
@@ -0,0 +1,17 @@
+/*
+  Dorm LED Project: main.ino
+
+  Created by: Michael Fischler
+  9/20/2016 @ WPI
+ */
+
+
+// the setup function runs once when you press reset or power the board
+void setup() {
+
+}
+
+// the loop function runs over and over again forever
+void loop() {
+
+}


Adds an echo example

Adds an echo example

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

--- Echo/Echo.ino
+++ Echo/Echo.ino
@@ -0,0 +1,28 @@
+/*
+ * Echos messages after converting them to upper case;
+ *
+ * Suggestions:
+ *  - Blink the led on different messages
+ */
+
+const int led = 13; // The pin the led is connected to
+const int length = 256; // The length of the buffer
+char buffer[length]; // Character buffer (holds 256 characters)
+
+void setup() {
+    pinMode(led, OUTPUT); // Sets the led pin to be an output pin
+    Serial.begin(9600); // Initialize the serial interface
+}
+
+void loop() {
+    if (Serial.available()) {
+        for(int i = 0; i < length; i++) {
+            buffer[i] = 0;
+        }
+        Serial.readBytesUntil('\r', buffer, length); // Read bytes into buffer until a \r is found or a timeout occures
+        String message = String(buffer); // Convert the buffer to an instance of a String
+        message.toUpperCase(); // Convert the message to upper case
+        Serial.println(message); // Print the contents of the buffer
+    }
+}
+


play music

play music

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

--- MP3/MP3.ino
+++ MP3/MP3.ino
@@ -0,0 +1,717 @@
+/**
+ * \file FilePlayer.ino
+ *
+ * \brief Example sketch of using the MP3Shield Arduino driver, with flexible list of files and formats
+ * \remarks comments are implemented with Doxygen Markdown format
+ *
+ * \author Bill Porter
+ * \author Michael P. Flaga
+ *
+ * This sketch listens for commands from a serial terminal (such as the Serial
+ * Monitor in the Arduino IDE). Listening for either a single character menu
+ * commands or an numeric strings of an index. Pointing to a music file, found
+ * in the root of the SdCard, to be played. A list of index's and corresponding
+ * files in the root can be listed out using the 'l' (little L) command.
+ *
+ * This sketch allows the various file formats to be played: mp3, aac, wma, wav,
+ * fla & mid.
+ *
+ * This sketch behaves nearly identical to MP3Shield_Library_Demo.ino, but has
+ * extra complicated loop() as to recieve string of characters to create the
+ * file index. As the Serial Monitor is typically default with no CR or LF, this
+ * sketch uses intercharacter time out as to determine when a full string has
+ * has been entered to be processed.
+ */
+
+#include <SPI.h>
+
+//Add the SdFat Libraries
+#include <SdFat.h>
+#include <SdFatUtil.h>
+
+//and the MP3 Shield Library
+#include <SFEMP3Shield.h>
+
+// Below is not needed if interrupt driven. Safe to remove if not using.
+#if defined(USE_MP3_REFILL_MEANS) && USE_MP3_REFILL_MEANS == USE_MP3_Timer1
+  #include <TimerOne.h>
+#elif defined(USE_MP3_REFILL_MEANS) && USE_MP3_REFILL_MEANS == USE_MP3_SimpleTimer
+  #include <SimpleTimer.h>
+#endif
+
+/**
+ * \brief Object instancing the SdFat library.
+ *
+ * principal object for handling all SdCard functions.
+ */
+SdFat sd;
+
+/**
+ * \brief Object instancing the SFEMP3Shield library.
+ *
+ * principal object for handling all the attributes, members and functions for the library.
+ */
+SFEMP3Shield MP3player;
+int16_t last_ms_char; // milliseconds of last recieved character from Serial port.
+int8_t buffer_pos; // next position to recieve character from Serial port.
+
+//------------------------------------------------------------------------------
+/**
+ * \brief Setup the Arduino Chip's feature for our use.
+ *
+ * After Arduino's kernel has booted initialize basic features for this
+ * application, such as Serial port and MP3player objects with .begin.
+ * Along with displaying the Help Menu.
+ *
+ * \note returned Error codes are typically passed up from MP3player.
+ * Whicn in turns creates and initializes the SdCard objects.
+ *
+ * \see
+ * \ref Error_Codes
+ */
+  char buffer[6]; // 0-35K+null
+
+
+// constants
+
+int dialHasFinishedRotatingAfterMs = 100;
+int debounceDelay = 10;
+int needToPrint = 0;
+int count;
+int in = 2;
+int lastState = LOW;
+int trueState = LOW;
+long lastStateChangeTime = 0;
+int cleared = 0;
+
+void setup() {
+
+  uint8_t result; //result code from some function as to be tested at later time.
+
+  Serial.begin(9600);
+  Serial.println("Welcome to JunkDJ!");
+  Serial.println("Please dail the phone to select the track");
+
+  //Serial.print(F("F_CPU = "));
+  //Serial.println(F_CPU);
+  //Serial.print(F("Free RAM = ")); // available in Version 1.0 F() bases the string to into Flash, to use less SRAM.
+  //Serial.print(FreeRam(), DEC);  // FreeRam() is provided by SdFatUtil.h
+  //Serial.println(F(" Should be a base line of 1017, on ATmega328 when using INTx"));
+
+
+  //Initialize the SdCard.
+  if(!sd.begin(SD_SEL, SPI_FULL_SPEED)) sd.initErrorHalt();
+  // depending upon your SdCard environment, SPI_HAVE_SPEED may work better.
+  if(!sd.chdir("/")) sd.errorHalt("sd.chdir");
+
+  //Initialize the MP3 Player Shield
+  result = MP3player.begin();
+  //check result, see readme for error codes.
+  if(result != 0) {
+    //Serial.print(F("Error code: "));
+    //Serial.print(result);
+    //Serial.println(F(" when trying to start MP3 player"));
+    if( result == 6 ) {
+      //Serial.println(F("Warning: patch file not found, skipping.")); // can be removed for space, if needed.
+      //Serial.println(F("Use the \"d\" command to verify SdCard can be read")); // can be removed for space, if needed.
+    }
+  }
+
+#if (0)
+  // Typically not used by most shields, hence commented out.
+  //Serial.println(F("Applying ADMixer patch."));
+  if(MP3player.ADMixerLoad("admxster.053") == 0) {
+    //Serial.println(F("Setting ADMixer Volume."));
+    MP3player.ADMixerVol(-3);
+  }
+#endif
+
+  // help();
+  //last_ms_char = millis(); // stroke the inter character timeout.
+  buffer_pos = 0; // start the command string at zero length.
+  //parse_menu('l'); // display the list of files to play
+
+}
+
+//------------------------------------------------------------------------------
+/**
+ * \brief Main Loop the Arduino Chip
+ *
+ * This is called at the end of Arduino kernel's main loop before recycling.
+ * And is where the user's serial input of bytes are read and analyzed by
+ * parsed_menu.
+ *
+ * Additionally, if the means of refilling is not interrupt based then the
+ * MP3player object is serviced with the availaible function.
+ *
+ * \note Actual examples of the libraries public functions are implemented in
+ * the parse_menu() function.
+ */
+void loop() {
+
+// Below is only needed if not interrupt driven. Safe to remove if not using.
+#if defined(USE_MP3_REFILL_MEANS) \
+    && ( (USE_MP3_REFILL_MEANS == USE_MP3_SimpleTimer) \
+    ||   (USE_MP3_REFILL_MEANS == USE_MP3_Polled)      )
+
+  MP3player.available();
+#endif
+
+  char inByte;
+  if (Serial.available() > 0) {
+    inByte = Serial.read();
+    if ((0x20 <= inByte) && (inByte <= 0x126)) { // strip off non-ASCII, such as CR or LF
+      if (isDigit(inByte)) { // macro for ((inByte >= '0') && (inByte <= '9'))
+        // else if it is a number, add it to the string
+        buffer[buffer_pos++] = inByte;
+      } else {
+        // input char is a letter command
+        buffer_pos = 0;
+        parse_menu(inByte);
+      }
+      buffer[buffer_pos] = 0; // update end of line
+      last_ms_char = millis(); // stroke the inter character timeout.
+    }
+  } else if ((millis() - last_ms_char) > 500 && ( buffer_pos > 0 )) {
+    // ICT expired and have something
+    if (buffer_pos == 1) {
+      // look for single byte (non-number) menu commands
+      parse_menu(buffer[buffer_pos - 1]);
+
+    } else if (buffer_pos > 5) {
+      // dump if entered command is greater then uint16_t
+      Serial.println(F("Ignored, Number is Too Big!"));
+
+    } else {
+      // otherwise its a number, scan through files looking for matching index.
+      int16_t fn_index = atoi(buffer);
+      SdFile file;
+      char filename[13];
+      sd.chdir("/",true);
+      uint16_t count = 1;
+      while (file.openNext(sd.vwd(),O_READ))
+      {
+        file.getFilename(filename);
+        if ( isFnMusic(filename) ) {
+
+          if (count == fn_index) {
+            Serial.print(F("Index "));
+            SerialPrintPaddedNumber(count, 5 );
+            Serial.print(F(": "));
+            Serial.println(filename);
+            Serial.print(F("Playing filename: "));
+            Serial.println(filename);
+            int8_t result = MP3player.playMP3(filename);
+            //check result, see readme for error codes.
+            if(result != 0) {
+              Serial.print(F("Error code: "));
+              Serial.print(result);
+              Serial.println(F(" when trying to play track"));
+            }
+            char title[30]; // buffer to contain the extract the Title from the current filehandles
+            char artist[30]; // buffer to contain the extract the artist name from the current filehandles
+            char album[30]; // buffer to contain the extract the album name from the current filehandles
+            MP3player.trackTitle((char*)&title);
+            MP3player.trackArtist((char*)&artist);
+            MP3player.trackAlbum((char*)&album);
+
+            //print out the arrays of track information
+            Serial.write((byte*)&title, 30);
+            Serial.println();
+            Serial.print(F("by:  "));
+            Serial.write((byte*)&artist, 30);
+            Serial.println();
+            Serial.print(F("Album:  "));
+            Serial.write((byte*)&album, 30);
+            Serial.println();
+            break;
+          }
+          count++;
+        }
+        file.close();
+      }
+
+    }
+
+    //reset buffer to start over
+    buffer_pos = 0;
+    buffer[buffer_pos] = 0; // delimit
+  }
+
+  delay(100);
+}
+
+uint32_t  millis_prv;
+
+//------------------------------------------------------------------------------
+/**
+ * \brief Decode the Menu.
+ *
+ * Parses through the characters of the users input, executing corresponding
+ * MP3player library functions and features then displaying a brief menu and
+ * prompting for next input command.
+ */
+void parse_menu(byte key_command) {
+
+  uint8_t result; // result code from some function as to be tested at later time.
+
+  // Note these buffer may be desired to exist globably.
+  // but do take much space if only needed temporarily, hence they are here.
+  char title[30]; // buffer to contain the extract the Title from the current filehandles
+  char artist[30]; // buffer to contain the extract the artist name from the current filehandles
+  char album[30]; // buffer to contain the extract the album name from the current filehandles
+
+  Serial.print(F("Received command: "));
+  Serial.write(key_command);
+  Serial.println(F(" "));
+
+  //if s, stop the current track
+  if(key_command == 's') {
+    Serial.println(F("Stopping"));
+    MP3player.stopTrack();
+
+  //if 1-9, play corresponding track
+  } else if(key_command >= '1' && key_command <= '9') {
+    //convert ascii numbers to real numbers
+    key_command = key_command - 48;
+
+#if USE_MULTIPLE_CARDS
+    sd.chvol(); // assign desired sdcard's volume.
+#endif
+    //tell the MP3 Shield to play a track
+    result = MP3player.playTrack(key_command);  //control play track
+
+    //check result, see readme for error codes.
+    if(result != 0) {
+      Serial.print(F("Error code: "));
+      Serial.print(result);
+      Serial.println(F(" when trying to play track"));
+    } else {
+
+      Serial.println(F("Playing:"));
+
+      //we can get track info by using the following functions and arguments
+      //the functions will extract the requested information, and put it in the array we pass in
+      MP3player.trackTitle((char*)&title);
+      MP3player.trackArtist((char*)&artist);
+      MP3player.trackAlbum((char*)&album);
+
+      //print out the arrays of track information
+      Serial.write((byte*)&title, 30);
+      Serial.println();
+      Serial.print(F("by:  "));
+      Serial.write((byte*)&artist, 30);
+      Serial.println();
+      Serial.print(F("Album:  "));
+      Serial.write((byte*)&album, 30);
+      Serial.println();
+    }
+
+  //if +/- to change volume
+  } else if((key_command == '-') || (key_command == '+')) {
+    union twobyte mp3_vol; // create key_command existing variable that can be both word and double byte of left and right.
+    mp3_vol.word = MP3player.getVolume(); // returns a double uint8_t of Left and Right packed into int16_t
+
+    if(key_command == '-') { // note dB is negative
+      // assume equal balance and use byte[1] for math
+      if(mp3_vol.byte[1] >= 254) { // range check
+        mp3_vol.byte[1] = 254;
+      } else {
+        mp3_vol.byte[1] += 2; // keep it simpler with whole dB's
+      }
+    } else {
+      if(mp3_vol.byte[1] <= 2) { // range check
+        mp3_vol.byte[1] = 2;
+      } else {
+        mp3_vol.byte[1] -= 2;
+      }
+    }
+    // push byte[1] into both left and right assuming equal balance.
+    MP3player.setVolume(mp3_vol.byte[1], mp3_vol.byte[1]); // commit new volume
+    Serial.print(F("Volume changed to -"));
+    Serial.print(mp3_vol.byte[1]>>1, 1);
+    Serial.println(F("[dB]"));
+
+  //if < or > to change Play Speed
+  } else if((key_command == '>') || (key_command == '<')) {
+    uint16_t playspeed = MP3player.getPlaySpeed(); // create key_command existing variable
+    // note playspeed of Zero is equal to ONE, normal speed.
+    if(key_command == '>') { // note dB is negative
+      // assume equal balance and use byte[1] for math
+      if(playspeed >= 254) { // range check
+        playspeed = 5;
+      } else {
+        playspeed += 1; // keep it simpler with whole dB's
+      }
+    } else {
+      if(playspeed == 0) { // range check
+        playspeed = 0;
+      } else {
+        playspeed -= 1;
+      }
+    }
+    MP3player.setPlaySpeed(playspeed); // commit new playspeed
+    Serial.print(F("playspeed to "));
+    Serial.println(playspeed, DEC);
+
+  /* Alterativly, you could call a track by it's file name by using playMP3(filename);
+  But you must stick to 8.1 filenames, only 8 characters long, and 3 for the extension */
+  } else if(key_command == 'f' || key_command == 'F') {
+    uint32_t offset = 0;
+    if (key_command == 'F') {
+      offset = 2000;
+    }
+
+    //create a string with the filename
+    char trackName[] = "track001.mp3";
+
+#if USE_MULTIPLE_CARDS
+    sd.chvol(); // assign desired sdcard's volume.
+#endif
+    //tell the MP3 Shield to play that file
+    result = MP3player.playMP3(trackName, offset);
+    //check result, see readme for error codes.
+    if(result != 0) {
+      Serial.print(F("Error code: "));
+      Serial.print(result);
+      Serial.println(F(" when trying to play track"));
+    }
+
+  /* Display the file on the SdCard */
+  } else if(key_command == 'd') {
+    if(!MP3player.isPlaying()) {
+      // prevent root.ls when playing, something locks the dump. but keeps playing.
+      // yes, I have tried another unique instance with same results.
+      // something about SdFat and its 500byte cache.
+      Serial.println(F("Files found (name date time size):"));
+      sd.ls(LS_R | LS_DATE | LS_SIZE);
+    } else {
+      Serial.println(F("Busy Playing Files, try again later."));
+    }
+
+  /* Get and Display the Audio Information */
+  } else if(key_command == 'i') {
+    MP3player.getAudioInfo();
+
+  } else if(key_command == 'p') {
+    if( MP3player.getState() == playback) {
+      MP3player.pauseMusic();
+      Serial.println(F("Pausing"));
+    } else if( MP3player.getState() == paused_playback) {
+      MP3player.resumeMusic();
+      Serial.println(F("Resuming"));
+    } else {
+      Serial.println(F("Not Playing!"));
+    }
+
+  } else if(key_command == 't') {
+    int8_t teststate = MP3player.enableTestSineWave(126);
+    if(teststate == -1) {
+      Serial.println(F("Un-Available while playing music or chip in reset."));
+    } else if(teststate == 1) {
+      Serial.println(F("Enabling Test Sine Wave"));
+    } else if(teststate == 2) {
+      MP3player.disableTestSineWave();
+      Serial.println(F("Disabling Test Sine Wave"));
+    }
+
+  } else if(key_command == 'S') {
+    Serial.println(F("Current State of VS10xx is."));
+    Serial.print(F("isPlaying() = "));
+    Serial.println(MP3player.isPlaying());
+
+    Serial.print(F("getState() = "));
+    switch (MP3player.getState()) {
+    case uninitialized:
+      Serial.print(F("uninitialized"));
+      break;
+    case initialized:
+      Serial.print(F("initialized"));
+      break;
+    case deactivated:
+      Serial.print(F("deactivated"));
+      break;
+    case loading:
+      Serial.print(F("loading"));
+      break;
+    case ready:
+      Serial.print(F("ready"));
+      break;
+    case playback:
+      Serial.print(F("playback"));
+      break;
+    case paused_playback:
+      Serial.print(F("paused_playback"));
+      break;
+    case testing_memory:
+      Serial.print(F("testing_memory"));
+      break;
+    case testing_sinewave:
+      Serial.print(F("testing_sinewave"));
+      break;
+    }
+    Serial.println();
+
+   } else if(key_command == 'b') {
+    Serial.println(F("Playing Static MIDI file."));
+    MP3player.SendSingleMIDInote();
+    Serial.println(F("Ended Static MIDI file."));
+
+#if !defined(__AVR_ATmega32U4__)
+  } else if(key_command == 'm') {
+      uint16_t teststate = MP3player.memoryTest();
+    if(teststate == -1) {
+      Serial.println(F("Un-Available while playing music or chip in reset."));
+    } else if(teststate == 2) {
+      teststate = MP3player.disableTestSineWave();
+      Serial.println(F("Un-Available while Sine Wave Test"));
+    } else {
+      Serial.print(F("Memory Test Results = "));
+      Serial.println(teststate, HEX);
+      Serial.println(F("Result should be 0x83FF."));
+      Serial.println(F("Reset is needed to recover to normal operation"));
+    }
+
+  } else if(key_command == 'e') {
+    uint8_t earspeaker = MP3player.getEarSpeaker();
+    if(earspeaker >= 3){
+      earspeaker = 0;
+    } else {
+      earspeaker++;
+    }
+    MP3player.setEarSpeaker(earspeaker); // commit new earspeaker
+    Serial.print(F("earspeaker to "));
+    Serial.println(earspeaker, DEC);
+
+  } else if(key_command == 'r') {
+    MP3player.resumeMusic(2000);
+
+  } else if(key_command == 'R') {
+    MP3player.stopTrack();
+    MP3player.vs_init();
+    Serial.println(F("Reseting VS10xx chip"));
+
+  } else if(key_command == 'g') {
+    int32_t offset_ms = 20000; // Note this is just an example, try your own number.
+    Serial.print(F("jumping to "));
+    Serial.print(offset_ms, DEC);
+    Serial.println(F("[milliseconds]"));
+    result = MP3player.skipTo(offset_ms);
+    if(result != 0) {
+      Serial.print(F("Error code: "));
+      Serial.print(result);
+      Serial.println(F(" when trying to skip track"));
+    }
+
+  } else if(key_command == 'k') {
+    int32_t offset_ms = -1000; // Note this is just an example, try your own number.
+    Serial.print(F("moving = "));
+    Serial.print(offset_ms, DEC);
+    Serial.println(F("[milliseconds]"));
+    result = MP3player.skip(offset_ms);
+    if(result != 0) {
+      Serial.print(F("Error code: "));
+      Serial.print(result);
+      Serial.println(F(" when trying to skip track"));
+    }
+
+  } else if(key_command == 'O') {
+    MP3player.end();
+    Serial.println(F("VS10xx placed into low power reset mode."));
+
+  } else if(key_command == 'o') {
+    MP3player.begin();
+    Serial.println(F("VS10xx restored from low power reset mode."));
+
+  } else if(key_command == 'D') {
+    uint16_t diff_state = MP3player.getDifferentialOutput();
+    Serial.print(F("Differential Mode "));
+    if(diff_state == 0) {
+      MP3player.setDifferentialOutput(1);
+      Serial.println(F("Enabled."));
+    } else {
+      MP3player.setDifferentialOutput(0);
+      Serial.println(F("Disabled."));
+    }
+
+  } else if(key_command == 'V') {
+    MP3player.setVUmeter(1);
+    Serial.println(F("Use \"No line ending\""));
+    Serial.print(F("VU meter = "));
+    Serial.println(MP3player.getVUmeter());
+    Serial.println(F("Hit Any key to stop."));
+
+    while(!Serial.available()) {
+      union twobyte vu;
+      vu.word = MP3player.getVUlevel();
+      Serial.print(F("VU: L = "));
+      Serial.print(vu.byte[1]);
+      Serial.print(F(" / R = "));
+      Serial.print(vu.byte[0]);
+      Serial.println(" dB");
+      delay(1000);
+    }
+    Serial.read();
+
+    MP3player.setVUmeter(0);
+    Serial.print(F("VU meter = "));
+    Serial.println(MP3player.getVUmeter());
+
+  } else if(key_command == 'T') {
+    uint16_t TrebleFrequency = MP3player.getTrebleFrequency();
+    Serial.print(F("Former TrebleFrequency = "));
+    Serial.println(TrebleFrequency, DEC);
+    if (TrebleFrequency >= 15000) { // Range is from 0 - 1500Hz
+      TrebleFrequency = 0;
+    } else {
+      TrebleFrequency += 1000;
+    }
+    MP3player.setTrebleFrequency(TrebleFrequency);
+    Serial.print(F("New TrebleFrequency = "));
+    Serial.println(MP3player.getTrebleFrequency(), DEC);
+
+  } else if(key_command == 'E') {
+    int8_t TrebleAmplitude = MP3player.getTrebleAmplitude();
+    Serial.print(F("Former TrebleAmplitude = "));
+    Serial.println(TrebleAmplitude, DEC);
+    if (TrebleAmplitude >= 7) { // Range is from -8 - 7dB
+      TrebleAmplitude = -8;
+    } else {
+      TrebleAmplitude++;
+    }
+    MP3player.setTrebleAmplitude(TrebleAmplitude);
+    Serial.print(F("New TrebleAmplitude = "));
+    Serial.println(MP3player.getTrebleAmplitude(), DEC);
+
+  } else if(key_command == 'B') {
+    uint16_t BassFrequency = MP3player.getBassFrequency();
+    Serial.print(F("Former BassFrequency = "));
+    Serial.println(BassFrequency, DEC);
+    if (BassFrequency >= 150) { // Range is from 20hz - 150hz
+      BassFrequency = 0;
+    } else {
+      BassFrequency += 10;
+    }
+    MP3player.setBassFrequency(BassFrequency);
+    Serial.print(F("New BassFrequency = "));
+    Serial.println(MP3player.getBassFrequency(), DEC);
+
+  } else if(key_command == 'C') {
+    uint16_t BassAmplitude = MP3player.getBassAmplitude();
+    Serial.print(F("Former BassAmplitude = "));
+    Serial.println(BassAmplitude, DEC);
+    if (BassAmplitude >= 15) { // Range is from 0 - 15dB
+      BassAmplitude = 0;
+    } else {
+      BassAmplitude++;
+    }
+    MP3player.setBassAmplitude(BassAmplitude);
+    Serial.print(F("New BassAmplitude = "));
+    Serial.println(MP3player.getBassAmplitude(), DEC);
+
+  } else if(key_command == 'M') {
+    uint16_t monostate = MP3player.getMonoMode();
+    Serial.print(F("Mono Mode "));
+    if(monostate == 0) {
+      MP3player.setMonoMode(1);
+      Serial.println(F("Enabled."));
+    } else {
+      MP3player.setMonoMode(0);
+      Serial.println(F("Disabled."));
+    }
+#endif
+
+  /* List out music files on the SdCard */
+  } else if(key_command == 'l') {
+    if(!MP3player.isPlaying()) {
+      Serial.println(F("Music Files found :"));
+      SdFile file;
+      char filename[13];
+      sd.chdir("/",true);
+      uint16_t count = 1;
+      while (file.openNext(sd.vwd(),O_READ))
+      {
+        file.getFilename(filename);
+        if ( isFnMusic(filename) ) {
+          SerialPrintPaddedNumber(count, 5 );
+          Serial.print(F(": "));
+          Serial.println(filename);
+          count++;
+        }
+        file.close();
+      }
+      Serial.println(F("Enter Index of File to play"));
+
+    } else {
+      Serial.println(F("Busy Playing Files, try again later."));
+    }
+
+  } else if(key_command == 'h') {
+    help();
+  }
+
+  // print prompt after key stroke has been processed.
+  Serial.print(F("Time since last command: "));
+  Serial.println((float) (millis() -  millis_prv)/1000, 2);
+  millis_prv = millis();
+  Serial.print(F("Enter s,1-9,+,-,>,<,f,F,d,i,p,t,S,b"));
+#if !defined(__AVR_ATmega32U4__)
+  Serial.print(F(",m,e,r,R,g,k,O,o,D,V,B,C,T,E,M:"));
+#endif
+  Serial.println(F(",l,h :"));
+}
+
+//------------------------------------------------------------------------------
+/**
+ * \brief Print Help Menu.
+ *
+ * Prints a full menu of the commands available along with descriptions.
+ */
+void help() {
+  Serial.println(F("Arduino SFEMP3Shield Library Example:"));
+  Serial.println(F(" courtesy of Bill Porter & Michael P. Flaga"));
+  Serial.println(F("COMMANDS:"));
+  Serial.println(F(" [1-9] to play a track"));
+  Serial.println(F(" [f] play track001.mp3 by filename example"));
+  Serial.println(F(" [F] same as [f] but with initial skip of 2 second"));
+  Serial.println(F(" [s] to stop playing"));
+  Serial.println(F(" [d] display directory of SdCard"));
+  Serial.println(F(" [+ or -] to change volume"));
+  Serial.println(F(" [> or <] to increment or decrement play speed by 1 factor"));
+  Serial.println(F(" [i] retrieve current audio information (partial list)"));
+  Serial.println(F(" [p] to pause."));
+  Serial.println(F(" [t] to toggle sine wave test"));
+  Serial.println(F(" [S] Show State of Device."));
+  Serial.println(F(" [b] Play a MIDI File Beep"));
+#if !defined(__AVR_ATmega32U4__)
+  Serial.println(F(" [e] increment Spatial EarSpeaker, default is 0, wraps after 4"));
+  Serial.println(F(" [m] perform memory test. reset is needed after to recover."));
+  Serial.println(F(" [M] Toggle between Mono and Stereo Output."));
+  Serial.println(F(" [g] Skip to a predetermined offset of ms in current track."));
+  Serial.println(F(" [k] Skip a predetermined number of ms in current track."));
+  Serial.println(F(" [r] resumes play from 2s from begin of file"));
+  Serial.println(F(" [R] Resets and initializes VS10xx chip."));
+  Serial.println(F(" [O] turns OFF the VS10xx into low power reset."));
+  Serial.println(F(" [o] turns ON the VS10xx out of low power reset."));
+  Serial.println(F(" [D] to toggle SM_DIFF between inphase and differential output"));
+  Serial.println(F(" [V] Enable VU meter Test."));
+  Serial.println(F(" [B] Increament bass frequency by 10Hz"));
+  Serial.println(F(" [C] Increament bass amplitude by 1dB"));
+  Serial.println(F(" [T] Increament treble frequency by 1000Hz"));
+  Serial.println(F(" [E] Increament treble amplitude by 1dB"));
+#endif
+  Serial.println(F(" [l] Display list of music files"));
+  Serial.println(F(" [0####] Enter index of file to play, zero pad! e.g. 01-65534"));
+  Serial.println(F(" [h] this help"));
+}
+
+void SerialPrintPaddedNumber(int16_t value, int8_t digits ) {
+  int currentMax = 10;
+  for (byte i=1; i<digits; i++){
+    if (value < currentMax) {
+      Serial.print("0");
+    }
+    currentMax *= 10;
+  }
+  Serial.print(value);
+}


version 29/7

version 29/7

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


Removed vestigial #include GPSconfig.h

Removed vestigial #include GPSconfig.h

#include "GPSconfig.h" is leftover from some earlier version. Since the
fie is no longer in the library, it causes a compilation error

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/tonesandtones/Adafruit-GPS-Library.git/'


Bumped version for release

Bumped version for release

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/FirstBuild/pizzaduino.git/'


reset

reset

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

--- Reset/Reset.ino
+++ Reset/Reset.ino
@@ -0,0 +1,35 @@
+#include <avr/io.h>
+#include <avr/wdt.h>
+
+int ledPin = LED_BUILTIN;
+
+void setup()
+{
+  MCUSR=0;
+  wdt_disable();
+  Serial.begin(9600);
+  Serial.println("BOOT!");
+  pinMode(ledPin, OUTPUT);
+  digitalWrite(ledPin, LOW);
+  delay(500);
+}
+
+void loop(){
+  if (Serial.available() > 0){
+    char cmd = Serial.read();
+    if (cmd == 'r'){
+      Serial.println("r received!");
+      wdt_enable(WDTO_1S);
+      delay(1000);
+      Serial.println("1 SEC.");
+      delay(1000);
+      Serial.println("1 SEC.");
+    }
+  }
+  wdt_reset();
+  Serial.println("loop");
+  digitalWrite(ledPin, HIGH);
+  delay(500);
+  digitalWrite(ledPin, LOW);
+  delay(500);
+}


Import initial

Import initial

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

--- stripNeopixel/stripNeopixel.ino
+++ stripNeopixel/stripNeopixel.ino
@@ -0,0 +1,668 @@
+/***************************************************
+  Neo Pixel Christma Tree - CC3000 Version
+
+  Light up a tree with all the colors of the holidays!
+  Control the color, pattern, size, and speed of animation of a
+  strip of neo pixels through a web page.
+
+  See the Adafruit learning system guide for more details
+  and usage information:
+
+  Dependencies:
+  - Adafruit CC3000 Library
+    https://github.com/adafruit/Adafruit_CC3000_Library
+  - Neo Pixel Library
+    https://github.com/adafruit/Adafruit_NeoPixel
+
+  License:
+
+  This example is copyright (c) 2013 Tony DiCola (tony@tonydicola.com)
+  and is released under an open source MIT license.  See details at:
+    http://opensource.org/licenses/MIT
+
+  This code was adapted from Adafruit CC3000 library example
+  code which has the following license:
+
+  Designed specifically to work with the Adafruit WiFi products:
+  ----> https://www.adafruit.com/products/1469
+
+  Adafruit invests time and resources providing this open source code,
+  please support Adafruit and open-source hardware by purchasing
+  products from Adafruit!
+
+  Written by Limor Fried & Kevin Townsend for Adafruit Industries.
+  BSD license, all text above must be included in any redistribution
+
+  Code adapté par et pour Au Fil Elec pour les besoins de l'entreprise
+ ****************************************************/
+
+#include <Adafruit_CC3000.h>
+#include <SPI.h>
+#include <Adafruit_NeoPixel.h>
+#include <avr/wdt.h>
+#include "utility/debug.h"
+#include "utility/socket.h"
+
+#define debug
+
+// These are the interrupt and control pins
+#define ADAFRUIT_CC3000_IRQ   2  // MUST be an interrupt pin!
+// These can be any two pins
+#define ADAFRUIT_CC3000_VBAT  7
+#define ADAFRUIT_CC3000_CS    10
+// Use hardware SPI for the remaining pins
+// On an MEGA 2560, SCK = 20, MISO = 22, and MOSI = 21
+
+Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,
+                                         SPI_CLOCK_DIVIDER); // you can change this clock speed
+
+#define WLAN_SSID       "your-network-SSID"   // cannot be longer than 32 characters!
+#define WLAN_PASS       "your-network-KEY-PASS"
+// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
+#define WLAN_SECURITY   WLAN_SEC_WPA2
+
+#define LISTEN_PORT           80      // What TCP port to listen on for connections.
+                                      // The HTTP protocol uses port 80 by default.
+
+#define MAX_ACTION            10      // Maximum length of the HTTP action that can be parsed.
+
+#define MAX_PATH              64      // Maximum length of the HTTP request path that can be parsed.
+                                      // There isn't much memory available so keep this short!
+
+#define MAX_TYPE              10
+
+#define MAX_CALLBACK          10
+
+#define BUFFER_SIZE           MAX_ACTION + MAX_PATH + 20  // Size of buffer for incoming request data.
+                                                          // Since only the first line is parsed this
+                                                          // needs to be as large as the maximum action
+                                                          // and path plus a little for whitespace and
+                                                          // HTTP version.
+
+#define TIMEOUT_MS            500    // Amount of time in milliseconds to wait for
+                                     // an incoming request to finish.  Don't set this
+                                     // too high or your server could be slow to respond.
+
+// Neo pixel configuration
+#define     PIXEL_PIN              4    // The pin which is connected to the neo pixel strip input.
+#define     PIXEL_COUNT            60   // The number of neo pixels in the strip.
+
+// Parameter 1 = number of pixels in strip
+// Parameter 2 = pin number (most are valid)
+// Parameter 3 = pixel type flags, add together as needed:
+//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
+//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
+//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
+//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
+Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, NEO_GRB + NEO_KHZ800);
+
+Adafruit_CC3000_Server httpServer(LISTEN_PORT);
+
+// Color scheme definitions.
+struct Color {
+  uint8_t red;
+  uint8_t green;
+  uint8_t blue;
+
+  Color(uint8_t red, uint8_t green, uint8_t blue): red(red), green(green), blue(blue) {}
+  Color(): red(0), green(0), blue(0) {}
+};
+
+struct ColorScheme {
+  Color* colors;
+  uint8_t count;
+
+  ColorScheme(Color* colors, uint8_t count): colors(colors), count(count) {}
+};
+
+Color rgbColors[3] = { Color(255, 0, 0), Color(0, 255, 0), Color(0, 0, 255) };
+ColorScheme rgb(rgbColors, 3);
+
+Color christmasColors[2] = { Color(255, 0, 0), Color(0, 255, 0) };
+ColorScheme christmas(christmasColors, 2);
+
+Color hanukkahColors[2] = { Color(0, 0, 255), Color(255, 255, 255) };
+ColorScheme hanukkah(hanukkahColors, 2);
+
+Color kwanzaaColors[3] = { Color(255, 0, 0), Color(0, 0, 0), Color(0, 255, 0) };
+ColorScheme kwanzaa(kwanzaaColors, 3);
+
+Color rainbowColors[7] = { Color(255, 0, 0), Color(255, 128, 0), Color(255, 255, 0), Color(0, 255, 0), Color(0, 0, 255), Color(128, 0, 255), Color(255, 0, 255) };
+ColorScheme rainbow(rainbowColors, 7);
+
+Color incandescentColors[2] = { Color(255, 140, 20), Color(0, 0, 0) };
+ColorScheme incandescent(incandescentColors, 2);
+
+Color fireColors[3] = { Color(255, 0, 0), Color(255, 102, 0), Color(255, 192, 0) };
+ColorScheme fire(fireColors, 3);
+
+ColorScheme schemes[7] = { incandescent, rgb, christmas, hanukkah, kwanzaa, rainbow, fire };
+
+// Enumeration of possible pattern types.
+enum Pattern { BARS = 0, GRADIENT, RAINBOWS, RAINBOW_CYCLE, COLOR_WIPE, THEATER_CHASE, THEATER_CHASE_RAINBOW };
+
+// Bar width values (in number of pixels/lights) for different size options.
+int barWidthValues[3] = { 1,      // Small
+                          3,      // Medium
+                          6  };   // Large
+
+// Gradient width values (in number of gradient repetitions, i.e. more repetitions equals a smaller gradient) for different size options.
+int gradientWidthValues[3] = { 12,     // Small
+                               6,      // Medium
+                               2   };  // Large
+
+// Speed values in amount of milliseconds to move one pixel/light.  Zero means no movement.
+int speedValues[4] = { 0,       // None
+                       500,     // Slow
+                       250,     // Medium
+                       50   };  // Fast
+
+// Variables to hold current state.
+int currentScheme = 0;
+Pattern currentPattern = RAINBOW_CYCLE;
+int currentWidth = 0;
+int currentSpeed = 0;
+
+uint8_t buffer[BUFFER_SIZE+1];
+int bufindex = 0;
+char action[MAX_ACTION+1];
+char path[MAX_PATH+1];
+char type[MAX_TYPE+1];
+char value[5];
+char callback[MAX_CALLBACK+1];
+char response[64];
+
+void setup() {
+  Serial.begin(115200);
+  Serial.println(F("Hello, CC3000!\n"));
+
+  Serial.print("Free RAM: "); Serial.println(getFreeRam(), DEC);
+
+  // Initialise the module
+  Serial.println(F("\nInitializing..."));
+  if (!cc3000.begin())
+  {
+    Serial.println(F("Couldn't begin()! Check your wiring?"));
+    while(1);
+  }
+
+  Serial.print(F("\nAttempting to connect to ")); Serial.println(WLAN_SSID);
+  if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {
+    Serial.println(F("Failed!"));
+    while(1);
+  }
+
+  Serial.println(F("Connected!"));
+
+  Serial.println(F("Request DHCP"));
+  while (!cc3000.checkDHCP())
+  {
+    delay(100); // ToDo: Insert a DHCP timeout!
+  }
+
+  // Display the IP address DNS, Gateway, etc.
+  while (! displayConnectionDetails()) {
+    delay(1000);
+  }
+
+  // Initialize the neo pixel strip.
+  strip.begin();
+  strip.show();
+  // Initialise random numbers
+  randomSeed(analogRead(0));
+
+  // ******************************************************
+  // You can safely remove this to save some flash memory!
+  // ******************************************************
+  Serial.println(F("\r\nNOTE: This sketch may cause problems with other sketches"));
+  Serial.println(F("since the .disconnect() function is never called, so the"));
+  Serial.println(F("AP may refuse connection requests from the CC3000 until a"));
+  Serial.println(F("timeout period passes.  This is normal behaviour since"));
+  Serial.println(F("there isn't an obvious moment to disconnect with a server.\r\n"));
+
+  // Start listening for connections
+  httpServer.begin();
+
+  Serial.println(F("Listening for connections..."));
+}
+
+// Compute the color of a pixel at position i using a gradient of the color scheme.
+// This function is used internally by the gradient function.
+struct Color gradientColor(struct ColorScheme& scheme, int range, int gradRange, int i) {
+  //wdt_enable(WDTO_1S);
+  int curRange = i / range;
+  int rangeIndex = i % range;
+  int colorIndex = rangeIndex / gradRange;
+  int start = colorIndex;
+  int end = colorIndex+1;
+  if (curRange % 2 != 0) {
+    start = (scheme.count-1) - start;
+    end = (scheme.count-1) - end;
+  }
+  return  Color(map(rangeIndex % gradRange, 0, gradRange, scheme.colors[start].red,   scheme.colors[end].red),
+                map(rangeIndex % gradRange, 0, gradRange, scheme.colors[start].green, scheme.colors[end].green),
+                map(rangeIndex % gradRange, 0, gradRange, scheme.colors[start].blue,  scheme.colors[end].blue));
+}
+
+// Display a gradient of colors for the provided color scheme.
+// Repeat is the number of repetitions of the gradient (pick a multiple of 2 for smooth looping of the gradient).
+// SpeedMS is the number of milliseconds it takes for the gradient to move one pixel.  Set to zero for no animation.
+void gradient(struct ColorScheme& scheme, int repeat = 1, int speedMS = 1000) {
+  //wdt_enable(WDTO_1S);
+  if (scheme.count < 2) return;
+
+  int range = (int)ceil((float)PIXEL_COUNT / (float)repeat);
+  int gradRange = (int)ceil((float)range / (float)(scheme.count - 1));
+
+  unsigned long time = millis();
+  int offset = speedMS > 0 ? time / speedMS : 0;
+
+  Color oldColor = gradientColor(scheme, range, gradRange, PIXEL_COUNT-1+offset);
+  for (int i = 0; i < PIXEL_COUNT; ++i) {
+    Color currentColor = gradientColor(scheme, range, gradRange, i+offset);
+    if (speedMS > 0) {
+      // Blend old and current color based on time for smooth movement.
+      strip.setPixelColor(i, map(time % speedMS, 0, speedMS, oldColor.red,   currentColor.red),
+                             map(time % speedMS, 0, speedMS, oldColor.green, currentColor.green),
+                             map(time % speedMS, 0, speedMS, oldColor.blue,  currentColor.blue));
+    }
+    else {
+      // No animation, just use the current color.
+      strip.setPixelColor(i, currentColor.red, currentColor.green, currentColor.blue);
+    }
+    oldColor = currentColor;
+  }
+  strip.show();
+}
+
+// Display solid bars of color for the provided color scheme.
+// Width is the width of each bar in pixels/lights.
+// SpeedMS is number of milliseconds it takes for the bars to move one pixel.  Set to zero for no animation.
+void bars(struct ColorScheme& scheme, int width = 1, int speedMS = 1000) {
+  //wdt_enable(WDTO_1S);
+  int maxSize = PIXEL_COUNT / scheme.count;
+  if (width > maxSize) return;
+
+  int offset = speedMS > 0 ? millis() / speedMS : 0;
+
+  for (int i = 0; i < PIXEL_COUNT; ++i) {
+    int colorIndex = ((i + offset) % (scheme.count * width)) / width;
+    strip.setPixelColor(i, scheme.colors[colorIndex].red, scheme.colors[colorIndex].green, scheme.colors[colorIndex].blue);
+  }
+  strip.show();
+}
+// Fill the dots one after the other with a color
+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 rainbows(uint8_t wait) {
+  uint16_t i, j;
+
+  for(j=0; j<256; j++) {
+    for(i=0; i<PIXEL_COUNT; i++) {
+      strip.setPixelColor(i, Wheel((i+j) & 255));
+    }
+    strip.show();
+    delay(wait);
+  }
+}
+
+// Slightly different, this makes the rainbow equally distributed throughout
+void rainbowCycle(uint8_t wait) {
+  uint16_t i, j, numbers;
+  numbers = 256 * 5;
+
+  for(j=0; j < numbers; j++) { // 5 cycles of all colors on wheel
+    for(i=0; i < PIXEL_COUNT; i++) {
+      strip.setPixelColor(i, Wheel(((i * 256 / PIXEL_COUNT) + j) & 255));
+    }
+    strip.show();
+    delay(wait);
+  }
+}
+
+//Theatre-style crawling lights.
+void theaterChase(uint32_t c, uint8_t wait) {
+  for (int j=0; j<10; j++) {  //do 10 cycles of chasing
+    for (int q=0; q < 3; q++) {
+      for (int i=0; i < PIXEL_COUNT; i=i+3) {
+        strip.setPixelColor(i+q, c);    //turn every third pixel on
+      }
+      strip.show();
+
+      delay(wait);
+
+      for (int i=0; i < PIXEL_COUNT; i=i+3) {
+        strip.setPixelColor(i+q, 0);        //turn every third pixel off
+      }
+    }
+  }
+}
+
+//Theatre-style crawling lights with rainbow effect
+void theaterChaseRainbow(uint8_t wait) {
+  for (int j=0; j < 256; j++) {     // cycle all 256 colors in the wheel
+    for (int q=0; q < 3; q++) {
+      for (int i=0; i < PIXEL_COUNT; i=i+3) {
+        strip.setPixelColor(i+q, Wheel( (i+j) % 255));    //turn every third pixel on
+      }
+      strip.show();
+
+      delay(wait);
+
+      for (int i=0; i < PIXEL_COUNT; i=i+3) {
+        strip.setPixelColor(i+q, 0);        //turn every third pixel off
+      }
+    }
+  }
+}
+
+// Input a value 0 to 255 to get a color value.
+// The colours are a transition r - g - b - back to r.
+uint32_t Wheel(byte WheelPos) {
+  WheelPos = 255 - WheelPos;
+  if(WheelPos < 85) {
+    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
+  }
+  if(WheelPos < 170) {
+    WheelPos -= 85;
+    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
+  }
+  WheelPos -= 170;
+  return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
+}
+
+void loop() {
+  //wdt_enable(WDTO_2S);
+  // Try to get a client which is connected.
+  Adafruit_CC3000_ClientRef client = httpServer.available();
+  if (client) {
+    Serial.println(F("Client connected."));
+    // Process this request until it completes or times out.
+    // Note that this is explicitly limited to handling one request at a time!
+
+    // Clear the incoming data buffer and point to the beginning of it.
+    bufindex = 0;
+    memset(&buffer, 0, sizeof(buffer));
+
+    // Clear action and path strings.
+    memset(&action,   0, sizeof(action));
+    memset(&path,     0, sizeof(path));
+    memset(&type,     0, sizeof(type));
+    memset(&value,    0, sizeof(value));
+    memset(&callback, 0, sizeof(callback));
+    memset(&response, 0, sizeof(response));
+
+    // Set a timeout for reading all the incoming data.
+    unsigned long endtime = millis() + TIMEOUT_MS;
+
+    // Read all the incoming data until it can be parsed or the timeout expires.
+    bool parsed = false;
+    while (!parsed && (millis() < endtime) && (bufindex < BUFFER_SIZE)) {
+      if (client.available()) {
+        buffer[bufindex++] = client.read();
+      }
+      parsed = parseRequest(buffer, bufindex, action, path, type, value, callback);
+    }
+
+    // Handle the request if it was parsed.
+    if (parsed) {
+      #ifdef debug
+        Serial.println(F("Processing request"));
+        Serial.print(F("Action: ")); Serial.println(action);
+        Serial.print(F("Path: ")); Serial.println(path);
+        Serial.print(F("Type: ")); Serial.println(type);
+        Serial.print(F("Value: ")); Serial.println(value);
+        Serial.print(F("Callback: ")); Serial.println(callback);
+        Serial.println(F(""));
+      #endif
+      // Check the action to see if it was a GET request.
+      if (strcmp(action, "GET") == 0) {
+        // Parse a single digit value.
+        int val = atoi(value);
+        // Update appropriate state for the associated command and value.
+        if (strcmp(type, "scheme") == 0) {
+          currentScheme = constrain(val, 0, 6);
+          #ifdef debug
+            Serial.print(F("currentScheme: ")); Serial.println(currentScheme);
+          #endif
+        }
+        else if (strcmp(type, "pattern") == 0) {
+          currentPattern = (Pattern)constrain(val, 0, 6);
+          #ifdef debug
+            Serial.print(F("currentPattern: ")); Serial.println(currentPattern);
+          #endif
+        }
+        else if (strcmp(type, "width") == 0) {
+          currentWidth = constrain(val, 0, 2);
+          #ifdef debug
+            Serial.print(F("currentWidth: ")); Serial.println(currentWidth);
+          #endif
+        }
+        else if (strcmp(type, "speed") == 0) {
+          currentSpeed = speedValues[constrain(val, 0, 3)];
+          #ifdef debug
+            Serial.print(F("currentSpeed: ")); Serial.println(currentSpeed);
+          #endif
+        }
+
+
+        // Respond with the path that was accessed.
+        // First send the success response code.
+        client.fastrprintln(F("HTTP/1.1 200 OK"));
+        // Then send a few headers to identify the type of data returned and that
+        // the connection will not be held open.
+        client.fastrprintln(F("Content-Type: application/json"));
+        client.fastrprintln(F("Connection: close"));
+        client.fastrprintln(F("Server: Adafruit CC3000"));
+        // Send an empty line to signal start of body.
+        client.fastrprintln(F(""));
+        // Now send the response data.
+        if (callback != NULL) {
+          sprintf(response, "%s({\"type\":\"%s\",\"value\":%s})", callback, type, value);
+        } else {
+          sprintf(response, "{\"type\":%s,\"value\":%s}", type, value);
+        }
+        client.fastrprintln(response);
+        #ifdef debug
+          Serial.print(F("Response: "));
+          Serial.println(response);
+        #endif
+        /*
+        if (callback != NULL) {
+          client.fastrprint(callback);
+          client.fastrprint(F("("));
+        }
+        client.fastrprint(F("{\"type\": \""));
+        client.fastrprint(type);
+        client.fastrprint(F("\", \"value\": "));
+        client.fastrprint(value);
+        client.fastrprint(F("}"));
+        if (callback != NULL) {
+          client.fastrprint(F(");"));
+        }
+        client.fastrprintln(F(""));
+        */
+      }
+      else {
+        // Unsupported action, respond with an HTTP 405 method not allowed error.
+        client.fastrprintln(F("HTTP/1.1 405 Method Not Allowed"));
+        client.fastrprintln(F("Connection: close"));
+        client.fastrprintln(F("Server: Adafruit CC3000"));
+        client.fastrprintln(F(""));
+      }
+    } else {
+      // Unsupported action, respond with an HTTP 405 method not allowed error.
+      client.fastrprintln(F("HTTP/1.1 412 Precondition Failed"));
+      client.fastrprintln(F("Connection: close"));
+      client.fastrprintln(F("Server: Adafruit CC3000"));
+      client.fastrprintln(F(""));
+    }
+
+    // Wait a short period to make sure the response had time to send before
+    // the connection is closed (the CC3000 sends data asyncronously).
+    delay(200);
+
+    // Close the connection when done.
+    Serial.println(F("Client disconnected"));
+    client.close();
+  }
+  /*
+  // Some example procedures showing how to display to the pixels:
+    colorWipe(strip.Color(255, 0, 0), 50); // Red
+    colorWipe(strip.Color(0, 255, 0), 50); // Green
+    colorWipe(strip.Color(0, 0, 255), 50); // Blue
+    // Send a theater pixel chase in...
+    theaterChase(strip.Color(127, 127, 127), 50); // White
+    theaterChase(strip.Color(127, 0, 0), 50); // Red
+    theaterChase(strip.Color(0, 0, 127), 50); // Blue
+
+    rainbow(20);
+    rainbowCycle(20);
+    theaterChaseRainbow(50);
+  */
+  // BARS = 0, GRADIENT, RAINBOW, RAINBOW_CYCLE, COLOR_WIPE, THEATER_CHASE, THEATER_CHASE_RAINBOW
+  // Update pixels based on current state.
+  switch(currentPattern) {
+    case BARS:
+      bars(schemes[currentScheme], barWidthValues[currentWidth], currentSpeed);
+      break;
+    case GRADIENT:
+      gradient(schemes[currentScheme], gradientWidthValues[currentWidth], currentSpeed);
+      break;
+    case RAINBOWS:
+      rainbows(20);
+      break;
+    case RAINBOW_CYCLE:
+      rainbowCycle(20);
+      break;
+    case COLOR_WIPE:
+      colorWipe(Wheel(random(0, 255)), 50);
+      break;
+    case THEATER_CHASE:
+      theaterChase(Wheel(random(0, 255)), 50); // Blue
+      break;
+    case THEATER_CHASE_RAINBOW:
+      theaterChaseRainbow(50);
+      break;
+  }
+}
+
+// Return true if the buffer contains an HTTP request.  Also returns the request
+// path and action strings if the request was parsed.  This does not attempt to
+// parse any HTTP headers because there really isn't enough memory to process
+// them all.
+// HTTP request looks like:
+//  [method] [path] [version] \r\n
+//  Header_key_1: Header_value_1 \r\n
+//  ...
+//  Header_key_n: Header_value_n \r\n
+//  \r\n
+bool parseRequest(uint8_t* buf, int bufSize, char* action, char* path, char* type, char* value, char* callback) {
+  //wdt_enable(WDTO_1S);
+  // Check if the request ends with \r\n to signal end of first line.
+  if (bufSize < 2)
+    return false;
+  if (buf[bufSize-2] == '\r' && buf[bufSize-1] == '\n') {
+    return parseFirstLine((char*)buf, action, path, type, value, callback);
+  }
+  return false;
+}
+
+// Parse the action and path from the first line of an HTTP request.
+bool parseFirstLine(char* line, char* action, char* path, char* type, char* value, char* callback) {
+  #ifdef debug
+    Serial.print(F("line: ")); Serial.println(line);
+  #endif
+  // Parse first word up to whitespace as action.
+  char* lineaction = strtok(line, " ");
+  if (lineaction == NULL) {
+    return false;
+  }
+  strncpy(action, lineaction, MAX_ACTION);
+  // Parse second word up to whitespace as path.
+  char* linepath = strtok(NULL, " ");
+  if (linepath == NULL) {
+    #ifdef debug
+      Serial.println(F("linepath NULL"));
+    #endif
+    return false;
+  }
+
+  char* tempPath = strncpy(path, linepath, MAX_PATH);
+  #ifdef debug
+    Serial.print(F("tempPath: ")); Serial.println(tempPath);
+    Serial.print(F("path: ")); Serial.println(path);
+  #endif
+  char* linetype = strtok(tempPath, "/");
+  if (linetype == NULL || strncmp(linetype, "arduino", 7) != 0) {
+    #ifdef debug
+      Serial.println(F("linetype1 NULL"));
+    #endif
+    return false;
+  }
+  linetype = strtok(NULL, "/");
+  if (linetype == NULL) {
+    #ifdef debug
+      Serial.println(F("linetype2 NULL"));
+    #endif
+    return false;
+  }
+  strncpy(type, linetype, MAX_TYPE);
+  char* linevalue = strtok(NULL, "/");
+  if (linevalue == NULL) {
+    #ifdef debug
+      Serial.println(F("linevalue NULL"));
+    #endif
+    value = "0";
+  } else {
+    int i = 0;
+    int j = 0;
+    while(linevalue[i] != '?' && linevalue[i] != '\0' && linevalue[i] != ' ') {
+      value[j++] = linevalue[i++];
+    }
+  }
+  char* linecallback = strtok(tempPath, "?");
+  if (linecallback != NULL) {
+    Serial.print(F("lineCallback: ")); Serial.println(linecallback);
+    int i = -1;
+    int j = 0;
+    while(linecallback[++i] != '=') {}
+    i++;
+    while(linecallback[i] != '&' && linecallback[i] != '\r') {
+      callback[j++] = linecallback[i++];
+    }
+  } else {
+    #ifdef debug
+      Serial.println(F("linecallback NULL"));
+    #endif
+  }
+  return true;
+}
+
+// Tries to read the IP address and other connection details
+bool displayConnectionDetails(void)
+{
+  uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv;
+
+  if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv))
+  {
+    Serial.println(F("Unable to retrieve the IP Address!\r\n"));
+    return false;
+  }
+  else
+  {
+    Serial.print(F("\nIP Addr: ")); cc3000.printIPdotsRev(ipAddress);
+    Serial.print(F("\nNetmask: ")); cc3000.printIPdotsRev(netmask);
+    Serial.print(F("\nGateway: ")); cc3000.printIPdotsRev(gateway);
+    Serial.print(F("\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv);
+    Serial.print(F("\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv);
+    Serial.println();
+    return true;
+  }
+}


The file I have with me.

The file I have with me.

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

--- code/code.ino
+++ code/code.ino
@@ -0,0 +1,105 @@
+/*Gyro output rate: 8kHz (if we do'nt use DLPF and 1kHz if do use DLPF)
+**Accelo output rate: 1kHz*/
+
+#define BAUD_RATE 115200 //general baud rates: 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, and 115200
+
+/*All of the below regiater addresses are for the most significant bits, i.e. for bits[15:8]*/
+
+#define GYRO_XOUT_REGISTER  0x43
+#define GYRO_YOUT_REGISTER  0x45
+#define GYRO_ZOUT_REGISTER  0x47
+
+#define ACCELO_XOUT_REGISTER 0x3B
+#define ACCELO_YOUT_REGISTER 0x3D
+#define ACCELO_ZOUT_REGISTER 0x3F
+
+#define TEMP_OUT_REGISTER 0x41
+
+/*The below register addresses are for the configuration bits of the gyrometer and accelometer ranges*/
+#define GYRO_CONFIG_REGISTER 0x1B
+#define FS_SEL_BIT 3//0-> +-250 deg/s 1-> +-500 deg/s 0-> +-1000 deg/s 0-> +-2000 deg/s
+
+#define ACCEL0_CONFIG_REGISTER 0x1C
+#define AFS_SEL_BIT 3//0-> +-2g 1-> +-4g 0-> +-8g 0-> +-16g
+
+/*One of the power registers.  Contains the Sleep mode bit. The sleep mode bit should be set to 0 for sleep mode to be deactivated.*/
+#define PWR_MGMT_1_REGISTER 0x6B
+
+#define MPU_ADDRESS 0x68 // Can be made 0x69 as well using the AD0 pin of the IMU.
+
+#define CONFIG_REGISTER 0x1A //The register containing the DLPF bits.
+
+#define CONFIG_VALUE  1  //0->260Hz  1->184Hz  2->94Hz  3->44Hz  4->21Hz  5->260Hz  6->10Hz  7->5Hz
+//It is should be noted that decreasing the bandwidth increases the delay.
+/*The dividing factors. They change with different modes of operation of the gyro and accelerometer*/
+#define ACCELO_DIVIDING_FACTOR 16384//2g->16384  4g->8192  8g->4096  16g->2048
+#define GYRO_DIVIDING_FACTOR 131  //250dps->131  500dps->65.5  1000dps->32.8  2000dps->16.4
+
+/*For temperature sensor*/
+#define TEMP_DIVIDING_FACTOR 340
+#define TEMP_OFFSET  36.53
+
+#include <Wire.h>
+
+void initI2CMPU(void);
+void getMPUValues(void);
+
+void printMPUValues(void);
+int16_t Ax, Ay, Az, Gx, Gy, Gz, temperature;
+
+void setup()
+{
+  initI2CMPU();
+  Serial.begin(BAUD_RATE);
+}
+
+void loop()
+{
+  getMPUValues();
+  printMPUValues();
+}
+
+void initI2CMPU(void) //Begins I2C communication with  MPU using it's internal 8MHz oscillator for CLKSEL and also wakes up the MPU.
+{
+  Wire.begin(MPU_ADDRESS);
+
+  Wire.beginTransmission(MPU_ADDRESS);
+
+  Wire.write(PWR_MGMT_1_REGISTER);
+  Wire.write(0);
+
+  Wire.endTransmission(true);
+  Wire.beginTransmission(MPU_ADDRESS);
+
+  Wire.write(CONFIG_REGISTER);
+  Wire.write(CONFIG_VALUE);
+
+  Wire.endTransmission(true);
+
+}
+
+void getMPUValues(void)
+{
+  Wire.beginTransmission(MPU_ADDRESS);
+  Wire.write(ACCELO_XOUT_REGISTER);
+  Wire.endTransmission(false);
+
+  Wire.requestFrom(MPU_ADDRESS, 14, true);
+
+  while (!Wire.available());
+
+  Ax = (Wire.read() << 8) | Wire.read();
+  Ay = (Wire.read() << 8) | Wire.read();
+  Az = (Wire.read() << 8) | Wire.read();
+
+  temperature = (Wire.read() << 8) | Wire.read();
+
+  Gx = (Wire.read() << 8) | Wire.read();
+  Gy = (Wire.read() << 8) | Wire.read();
+  Gz = (Wire.read() << 8) | Wire.read();
+}
+
+void printMPUValues(void)
+{
+  Serial.print((double)Gx / GYRO_DIVIDING_FACTOR); Serial.print('\t');Serial.print((double)Gy / GYRO_DIVIDING_FACTOR);Serial.print('\t');  Serial.print((double)Gz / GYRO_DIVIDING_FACTOR); Serial.print('\t');Serial.print((double)Ax / ACCELO_DIVIDING_FACTOR);Serial.print('\t');Serial.print((double)Ay / ACCELO_DIVIDING_FACTOR);Serial.print('\t');Serial.print((double)Az / ACCELO_DIVIDING_FACTOR);Serial.println((double)temperature / TEMP_DIVIDING_FACTOR + TEMP_OFFSET);
+}


Added debug flag for nduino com

Added debug flag for nduino com

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/ekwoodrich/nirha.git/'


Communication from PC to slave working (slowly)

Slow, but steady communication from PC passed through to slave. Still only works when red LED is on on the master, but LED is relatively constant now.

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/dkadish/nuit_blanche_ocean.git/'