Multiple Teensy 3.6 from one program

Status
Not open for further replies.

rohman

Member
I need to utilize a large number of pwm controlled LEDs, more than what's possible to connect to one Teensy 3.6. Is there any way to connect two Teensy 3.6 boards and program them with one program? Like "turn on LED1 on first Teensy and LED5 on second Teensy"?
 
Thanks. I'll look in to it asap. PWM is what I'm looking for since I need to control the intensity of each LED (of 40 in total).
 
Using a Teensy as an I/O extender might not be the simplest or most economical way to go. A common way to get more I/O is to use an I/O extender or bus extender chip. You talk to it over i2c or spi to control its I/O. It's also common to use shift register chips. A benefit this approach offers is that bus extender chips sometimes also perform level shifting. You might also consider dedicated LED driver ICs that do the PWM for you.
 
actually im not an expert on pwm but if its analogWrite and analogWriteResolution your using, the i2c and spi versions support them. after you construct your teensy name you can just send your commands as needed:

teensy.analogWrite(pin,val);
 
All good pieces of advise. I just wanted to be as hardware clean as possible keeping all logic at programming level and since the Teensies seemed so ultra clever I thought that full blown chaining was also avilable. I think I'll just program them individually and let them send simple handshakes to prevent split brain issues.
 
fastled support for all supported pins is supported in my libs, but the spi version would be better for that
im not sure for external chips that do addressable leds, but spi would be a requirement for streaming at high speeds
Tony
 
fastled support for all supported pins is supported in my libs, but the spi version would be better for that
im not sure for external chips that do addressable leds, but spi would be a requirement for streaming at high speeds
Tony
Not sure I understand your point. Using NeoPixels / FastLed you could control all 40 LEDs with one pin. Hence, no need for multiple Teensy boards or a library to connect them.
 
NeoPixels! I've seen the light! (pun intended). Back to the drawing board.
Thanks gfvalo!
No problem. There are many form factors available:
https://www.adafruit.com/category/168
"NeoPixel" is AdaFruit parlance, WS2812 is the generic term. Also, there are other flavors of controllable LED available. Some use a SPI interface and don't have the picky timing constraints that WS2812s do.

Either FastLED or Adafruit's NeoPixel library will probably work, depending on your needs.


well thats 2 blunt statements, goodbye post.
That appears directed at me. I've reread my post several times and found nothing I consider offensive. Regardless, no offense was intended.
 
Last edited:
Might want to consider the APA102 addressable LEDs. They're a bit more expensive and they need both clock and data, but they update faster for animation and they don't have the fussy timing requirements of the WS2812 LEDs so they're easier to combine with sensors and other things that require CPU.
 
Might want to consider the APA102 addressable LEDs. They're a bit more expensive and they need both clock and data, but they update faster for animation and they don't have the fussy timing requirements of the WS2812 LEDs so they're easier to combine with sensors and other things that require CPU.
Yes, I like those. Adafruit calls them DotStar. Only downside is they appear not to be available in the same large range of form factors as the NeoPixels. But, if you can find one that works for your application, I recommend them.
 
Last edited:
Status
Not open for further replies.
Back
Top