~proflutz/SAMD21code

dd8869e58cebcd63c7097e0d5163cb0127b50d13 — Raymond Lutz 1 year, 3 months ago 3dd1290
commented out neo pix for QT
1 files changed, 10 insertions(+), 11 deletions(-)

M tictaccode_QTPY.ino
M tictaccode_QTPY.ino => tictaccode_QTPY.ino +10 -11
@@ 41,7 41,7 @@
*/
// #include <Adafruit_NeoPixel.h>
//#include <Adafruit_DotStar.h>
#include <Adafruit_NeoPixel_ZeroDMA.h>
// #include <Adafruit_NeoPixel_ZeroDMA.h> needs a modified lib


//Adafruit_DotStar pixels(1, 7, 8, DOTSTAR_BRG); // works on a Trinket


@@ 50,7 50,7 @@

#define PIN 11
#define NUM_PIXELS 1
Adafruit_NeoPixel_ZeroDMA pixels(NUM_PIXELS, PIN, NEO_GRB);
// Adafruit_NeoPixel_ZeroDMA pixels(NUM_PIXELS, PIN, NEO_GRB);

#include <RTCZero.h>
#include <MicroNMEA.h>


@@ 118,9 118,8 @@ void PPSexternalInt_handler(void) {
  PPSarrived = true;
  tcENABLE();
  // turn on LED
  // digitalWrite(LED_BUILTIN, HIGH);
  pixels.setPixelColor(0, pixels.Color(255, 0, 255));
  pixels.show();
  // pixels.setPixelColor(0, pixels.Color(255, 0, 255));
  // pixels.show();
}

void alarmMatch() {


@@ 132,9 131,9 @@ void alarmMatch() {
}

void setup() {
  pixels.begin();  // Initialize pins for output
  pixels.setBrightness(10);
  pixels.setPixelColor(0, pixels.Color(255, 0, 0));
  // pixels.begin();  // Initialize pins for output
  // pixels.setBrightness(10);
  // pixels.setPixelColor(0, pixels.Color(255, 0, 0));
  console.begin(9600);
  while (!console and BLOCKWAITINGFORSERIAL)
    ;


@@ 151,7 150,7 @@ void setup() {
  {
    GPS_enabled = false;
    //    pixels.setPixelColor(0, pixels.Color(255, 0, 0));
    pixels.show();
    // pixels.show();
    RTCconf();
  } else {
    GPS_enabled = true;


@@ 187,8 186,8 @@ void loop() {
    DAC_value = wave_tables_f1_f2[2 * i_wavetable + bit_value];
    if (i_symbol == int(LED_FLASH_DURATION * DAC_OUT_FREQ / N_SAMPLES_WAVETABLE))  // turn off blinking LED
    {
      pixels.clear();  //      digitalWrite(LED_BUILTIN, LOW);
      pixels.show();
      // pixels.clear();  //      digitalWrite(LED_BUILTIN, LOW);
      // pixels.show();
    }
    if (i_symbol == 0 && i_sample <= RAMP_STEPS)  // still in ramp sync pulse
    {