From b5886f09191ef2f512d30fdffcd482cab5b0c8d3 Mon Sep 17 00:00:00 2001 From: Fisch Date: Sat, 5 Dec 2020 18:20:57 +0100 Subject: [PATCH] change to teensy3.2 --- platformio.ini | 17 ++++++++++++++++- src/main.cpp | 7 +++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/platformio.ini b/platformio.ini index d96ff70..3e2d43b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -13,5 +13,20 @@ platform = espressif8266 board = d1_mini framework = arduino +build_flags = + -D PIN_DATA=D5 + lib_deps = - fastled/FastLED \ No newline at end of file + fastled/FastLED + +[env:teensy31] +platform = teensy +board = teensy31 +framework = arduino +build_flags = + -D USB_SERIAL_HID + -D PIN_DATA=0 + +lib_deps = + fastled/FastLED + diff --git a/src/main.cpp b/src/main.cpp index 3288424..8090cf4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,6 +19,8 @@ * */ +//Upload for teensy4.1 with: pio run --environment teensy41 -t upload + #define SK6812RGBW //power consumption is around 51mA per LED at RGBW 100% /* R=1234mA (with 112 LEDS 100%) @@ -46,13 +48,14 @@ const uint8_t #endif -#define PIN_DATA D5 // led data output pin2 +//#define PIN_DATA D5 // led data output pin2 + // #define PIN_CLOCK 7 // led data clock pin (uncomment if you're using a 4-wire LED type) // --- Serial Settings const unsigned long //SerialSpeed = 115200; // serial port speed - SerialSpeed = 500000; // serial port speed + SerialSpeed = 256000; // serial port speed const uint16_t SerialTimeout = 60*10; // time before LEDs are shut off if no data (in seconds), 0 to disable