Advice regarding a Teensy OctoWS2811 adapter

Status
Not open for further replies.

SteveSFX

Well-known member
Hello all

I am tinkering with a project that has a couple of strips of RGB's attached to the OctoWS2811 adapter. Channels 1 and 2 which I believe are pins 2 and 14 on the Teensy.

But, I have an existing project that uses the Fastled library and I would like to use that with the above board for it's isolation and connection ability.

From what I understand, the first channel is 0-300 leds, the second is 301-600 and so on (is that correct?).

So is it possible for me to talk directly to the data pin on the strips through the OctoWS2811 board without using the Octo library? I REALLY don't want to try and have to re-write the code as the lighting effect is very complicated.

If I talk to pin 2 (channel 1) with Fastled, then it appears to work, but the second channel on pin 14 does not and it also flashes all kinds of weird stuff on that second strip, even when I am not talking to it (or even have it enabled).

Any advice would be great.
 
OK. Looking at the circuit diagram for the Octoboard, it's simply a buffer for the data. So, I am not sure why I am getting problems with the second strip of RGB's firing up when I am not talking to them.
They do it even if the strip is entirely commented out of the code.

Also, I understand you can daisy-chain two of these octoboards together? Any reference on how you address the second board if you do that?
 
Of course, if you put a 10k pot to control the speed of the effect on A1, the same pin as the output.... it isn't going to work :eek:
 
Glad you got it working.

And to answer the original question, yes, if you've configured for 300 LEDs per pin, you would index 0 to 299 for the LEDs on pin 2, 300 to 599 for LEDs on pin 14, and so on.

If using Teensy 4, you can also control which pins are used. In Arduino, click File > Examples > OctoWS2811 > Teensy4_PinList.
 
Thanks Paul. Brain hiccup there.

Can you daisy chain two of these together? (Someone said you can). I can't see how unless you hard wire the input pins across to spare Teensy 3.2 pins
 
If daisy chain has the usual meaning of your PC transmits to only 1 board and it sends to the next, then no, that's not possible with Teensy 3.2. It could maybe be done with Teensy 3.6, 4.0, 4.1 which have a USB host port.

But if daisy chain means you plug both Teensy into a USB hub so your PC transmits to both of them, and they have a sync signal connected to they coordinate to update the LEDs at the same moment, then yes. The VideoDisplay demo and documentation on the website shows how to do this.
 
Thanks Paul
I have 9 strips of LEDS to control. I think I will probably just use a 330R resistor on the data line to the shortest strip (about 30 leds).
I'll use the Octoboard for the 8 other longer strips. I think that should be OK.

Thanks!
 
Question on Multithreading (same project)

How many threads can you run simultaneously and am I asking for issues updating Fastled data using threads?

For some reason, my thread 'test' doesn't work anyway. I set up the threads in setup, but it only ever runs the thread once (yes, threads.yield() is in place).
 
I got it working but it's worse

My threads appear to be updating about once a second, yet there is nothing in the thread 'loop' to introduce that delay.

Code:
#include <Arduino.h>
#include "TeensyThreads.h"

void setup() {
  threads.addThread(test);
}

void loop() {
}

void test() {
	while (1) {
		Serial.println("Test loop");
		threads.delay(1000);
		threads.yield();
	}
}

Prints 'Test loop" about once a second
 
Last edited:
I got it working but it's worse

My threads appear to be updating about once a second, yet there is nothing in the thread 'loop' to introduce that delay.

Code:
#include <Arduino.h>
#include "TeensyThreads.h"

void setup() {
  threads.addThread(test);
}

void loop() {
}

void test() {
	while (1) {
		Serial.println("Test loop");
[COLOR="#FF0000"]		threads.delay(1000);             <<====
[/COLOR]		threads.yield();
	}
}

Prints 'Test loop" about once a second

I've not used threads, so I may be missing something simple. Try removing and/or commenting out the RED line above & see what happens . . .

Mark J Culross
KD5RXT
 
The loop prints to serial with or without that delay. With that delay in place its nearly 2 seconds. I meant to remove that in the code thread I posted.

Does spreading you rgb control across threads make the process faster? Or are you simply dividing up resources and it ends up being about the same speed?
 
Can someone possibly help convert this line to the Octo library usage

In Fastled its:

test_leds = CHSV(h, 255, b);


and the only example I can find in the Octo library that is anywhere near is the basic: leds.setPixel(i, color);
 
Status
Not open for further replies.
Back
Top