From dc50abcbf5e818d61bd5cc2f59f07ebbc2fe52c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Dancs=C3=B3?= Date: Tue, 9 Jun 2020 11:05:26 +0200 Subject: [PATCH 1/5] Update TeensyStripController.ino --- TeensyStripController.ino | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/TeensyStripController.ino b/TeensyStripController.ino index 61ba512..303edfe 100644 --- a/TeensyStripController.ino +++ b/TeensyStripController.ino @@ -97,11 +97,7 @@ void setup() { //Initialize and find value of the test pin pinMode(TestPin,INPUT_PULLUP); - if (! digitalRead(TestPin)) { - // run test if button is grounded - Test(); - } - + SetBlinkMode(0); } @@ -109,6 +105,12 @@ void setup() { void loop() { // put your main code here, to run repeatedly: + //Check if testpin is pressed + if (! digitalRead(TestPin)) { + // run test if button is grounded + Test(); + } + //Check if data is available if (Serial.available()) { From 74ecf3c38fa872a247f77ff8cc918c90849fd8b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Dancs=C3=B3?= Date: Tue, 9 Jun 2020 11:19:30 +0200 Subject: [PATCH 2/5] Update TeensyStripController.ino -changed to 1 second interval -changed to make test available at any time --- TeensyStripController.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TeensyStripController.ino b/TeensyStripController.ino index 303edfe..a776d90 100644 --- a/TeensyStripController.ino +++ b/TeensyStripController.ino @@ -370,7 +370,7 @@ word ReceiveWord() { void Test() { - int microsec = 3000000; // change them all in 3 seconds + int microsec = 1000000; // change them each second ColorWipe(RED, microsec); ColorWipe(GREEN, microsec); From 5e5fbffdf664f4f1e5f9776a8bf6e8bbfba4338b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Dancs=C3=B3?= Date: Wed, 9 Jun 2021 08:40:40 +0200 Subject: [PATCH 3/5] Update TeensyStripController.ino number of "ledsperstrip" increased for initializing run of leds code and description cleanup test pin check removed as its obsolete now --- TeensyStripController.ino | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/TeensyStripController.ino b/TeensyStripController.ino index a776d90..5728af0 100644 --- a/TeensyStripController.ino +++ b/TeensyStripController.ino @@ -48,13 +48,18 @@ pin 3 - Do not use as PWM. Normal use is ok. */ - +#include "arduino.h" #include "OctoWS2811Ext.h" //A slightly hacked version of the OctoWS2811 lib which allows for dynamic setting of the number of leds is used. //Definiton of Major and Minor part of the firmware version. This value can be received using the V command. //If something is changed in the code the number should be increased. #define FirmwareVersionMajor 1 -#define FirmwareVersionMinor 3 +#define FirmwareVersionMinor 4 + +//For Teensy 4.0 you can define the nuber of ouput Pins - 8 should be good (for 3.1/3.2 this is only used for calculation and schould not changed) +const int numPins = 8; +//for tesnsy 4.0 you can change the standard port (schould not be done) - Not used for 3.1/3.2 +byte pinList[numPins] = {2, 14, 7, 8, 6, 20, 21, 5}; //Defines the max number of leds which is allowed per ledstrip. //This number is fine for Teensy 3.2, 3.1. For newer Teensy versions (they dont exists yet) it might be possible to increase this number. @@ -68,8 +73,8 @@ #define TestPin 17 //Memory buffers for the OctoWS2811 lib -DMAMEM int displayMemory[MaxLedsPerStrip*6]; -int drawingMemory[MaxLedsPerStrip*6]; +DMAMEM int displayMemory[MaxLedsPerStrip * numPins * 3 / 4]; +int drawingMemory[MaxLedsPerStrip * numPins * 3 / 4]; //Variable used to control the blinking and flickering of the led of the Teensy elapsedMillis BlinkTimer; @@ -79,9 +84,13 @@ elapsedMillis BlinkModeTimeoutTimer; //Config definition for the OctoWS2811 lib const int config = WS2811_RGB | WS2811_800kHz; //Dont change the color order (even if your strip are GRB). DOF takes care of this issue (see config of ledstrip toy) -OctoWS2811Ext leds(MaxLedsPerStrip, displayMemory, drawingMemory, config); +#if defined(__IMXRT1062__) + OctoWS2811Ext leds(MaxLedsPerStrip, displayMemory, drawingMemory, config, numPins, pinList); +#else + OctoWS2811Ext leds(MaxLedsPerStrip, displayMemory, drawingMemory, config); +#endif -word configuredStripLength=144; +word configuredStripLength=448; //Setup of the system. Is called once on startup. void setup() { @@ -97,7 +106,11 @@ void setup() { //Initialize and find value of the test pin pinMode(TestPin,INPUT_PULLUP); - + if (! digitalRead(TestPin)) { + // run test if button is grounded + Test(); + } + SetBlinkMode(0); } @@ -105,12 +118,6 @@ void setup() { void loop() { // put your main code here, to run repeatedly: - //Check if testpin is pressed - if (! digitalRead(TestPin)) { - // run test if button is grounded - Test(); - } - //Check if data is available if (Serial.available()) { @@ -144,6 +151,10 @@ void loop() { //Get max number of leds per strip SendMaxNumberOfLeds(); break; + case 'T': + //initiate Test over serial + Test(); + break; default: // no unknown commands allowed. Send NACK (N) Nack(); @@ -370,7 +381,7 @@ word ReceiveWord() { void Test() { - int microsec = 1000000; // change them each second + int microsec = 250000; // change color every 1/4 second ColorWipe(RED, microsec); ColorWipe(GREEN, microsec); From bf8314549d573e09c60236e9f1a74ddffb1889e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Dancs=C3=B3?= Date: Sun, 13 Jun 2021 20:44:35 +0200 Subject: [PATCH 4/5] Update README.md --- README.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 42b6e76..a44a8e7 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,15 @@ -TeensyStripController 1.03 +TeensyStripController 1.04 ========================== -Firmware for a Teensy 3.1 or Teensy 3.2 to control WS2811/WS2812 based ledstrips. Fully compatible with the DirectOutput Framework. +Firmware for a Teensy 3.1, 3.2 or 4.0 to control WS2811/WS2812 based ledstrips. Fully compatible with the DirectOutput Framework. ![Teensy 3.1 with OctoWS2811 adaptor](http://www.pjrc.com/store/octo28_adaptor_6.jpg) Hardware -------- -This code has been designed for Teensy 3.1 or Teensy 3.2. For easy installation of the ledstrips is is highly recommended to get a OctoWS2811 adaptor board as well. +This code has been designed for Teensy 3.1, 3.2. or Teensy 4.0 For easy installation of the ledstrips is is highly recommended to get a OctoWS2811 adaptor board as well. + Both boards are available at http://pjrc.com/store/ For the Teensy be sure to get a Teensy 3.2, preferably the version which has the pins already soldered in. @@ -27,11 +28,7 @@ To drive the controller at least DirectOutput Framework R3 is required. Check ou Integrated Product ------------------ -The Oak Micros Pinball Addressable LEDs (PAL) board is a pre-built integrated product that can be used to control up to 8 addressable LEDs strips. It uses the Teensy 3.2 and the latest software from this site. It includes a pushbutton which can be used to initiate a LED test when powered up and has a pluggable screw connector for power and 6 LED connections. The remaining two other LED connections are available on an optional 0.1" header. - -![Oak Micros PAL board](http://vpforums.org/imghost/24/pal_board.jpg) - -For further information read the [user guide](https://drive.google.com/open?id=1Zk_5RxsWX4VIPhT4XtGlj1rNlBTug39a) and see [this thread](https://www.vpforums.org/index.php?showtopic=43482) on VPForums.org. +For people not very comfortable with lots of wires, stripping and crimping, GermanGamingSupplies (https://germangamingsupplies.com/Teensy-Control-Box_1)developed a nice little Box that makes it much more easy and convenient to install it into your VPins. Documentation ------------- From 6ec5e685027af0be4820ae1c0d7efb1879b2d36c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Dancs=C3=B3?= Date: Sun, 13 Jun 2021 20:50:49 +0200 Subject: [PATCH 5/5] Update README.md removed OAK Micros because of going out of business, Integrated GermanGamingSupplies product --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a44a8e7..cab8639 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,10 @@ To drive the controller at least DirectOutput Framework R3 is required. Check ou Integrated Product ------------------ -For people not very comfortable with lots of wires, stripping and crimping, GermanGamingSupplies (https://germangamingsupplies.com/Teensy-Control-Box_1)developed a nice little Box that makes it much more easy and convenient to install it into your VPins. +For people not very comfortable with lots of wires, stripping and crimping, GermanGamingSupplies developed a nice little Box that makes it much more easy and convenient to install it into your VPins. +Go to Product: ![Link](https://germangamingsupplies.com/Teensy-Control-Box_1) + +![Teensy Control Box](https://germangamingsupplies.com/media/image/product/115/lg/teensy-control-box_1.jpg) Documentation -------------