Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: OctoWS2811 library version

  1. #1
    Junior Member
    Join Date
    Jan 2020
    Location
    New York City
    Posts
    15

    OctoWS2811 library version

    The OctoWS2811 library has been updated for Teensy 4.0/4.1 (awesome! It's amazing!) allowing ANY pin to be used with high speed DMA and parallel output. It's amazing; I'm using it to drive 16 LED strips right now.

    BUT - The version number seems to be stuck at 1.4 ("released 3 years ago") on the PlatformIO library registry which only has the old, pre-Teensy 4.1 version.

    I think that the version in the official Arduino library is out of date, too.

  2. #2
    A very timely post! I've been using FastLED on a Teensy 4.0 with parallel output (5 pins), and everything has been working fine...until I started using Serial1 to communicate with another Teensy. I was aware of the blocking issues with FastLED, but I had ASSumed that the T4 was so fast that it wouldn't have a problem with simple serial TX interrupts - wrong! The LED output is severely corrupted. Enabling interrupt retries (FASTLED_INTERRUPT_RETRY_COUNT 1) had no effect, and disabling interrupts (FASTLED_ALLOW_INTERRUPTS 0) produced compiler errors.

    So I've just discovered OctoWS2811, which seems like exactly what I need, especially if it really supports custom pin lists so I don't have to respin my PCB design. I haven't found much information on the custom pins aspect, since it seems like the currently available library (1.4) no longer has an example sketch showing how to use this.

    Questions:
    1) How can I get the latest version to use with PlatformIO?
    2) Where can I find more info on T4 and custom pin lists?
    3) I've seen some posts about how to use OctoWS2811 with FastLED. Am I safe in assuming that this is still correct/current?
    4) I'm not using any of the FastLED effects; rolling my own instead. The main value to me, other than the LED serial output, is in the HSV to RGB conversion. But with fast floating point available on the T4, I'm thinking I should also roll my own color space conversion. I'm not super excited about trying to duplicate the FastLED "rainbow" (vs. "spectrum") color map, or dealing with Gamma correction, but maybe I just need to get over that mental hump.

    I'm open to suggestions.
    Thanks!

  3. #3
    Junior Member
    Join Date
    Jan 2020
    Location
    New York City
    Posts
    15
    You can grab the latest version of the OctoWS2811 library from GitHub and you'll be able to use a custom pin list and even put the pins in any order. Here is sample code.

    I have not tried to see whether this version of the library can be combined with FastLED. If it doesn't work "out of the box," I think you could probably just borrow FastLED's color space code (CHSV and CRGB) and still use OctoWS2811 to show the actual pixels.... that's pretty much what I'm planning to do!

  4. #4
    Thanks for the sample code! Before I saw that I tried the "rainbow" example and got several compiler errors, like:
    Code:
    .pio/libdeps/teensy40/OctoWS2811/OctoWS2811.cpp: In member function 'void OctoWS2811::begin()':
    .pio/libdeps/teensy40/OctoWS2811/OctoWS2811.cpp:85:2: error: 'GPIOD_PCOR' was not declared in this scope
      GPIOD_PCOR = 0xFF;
    Is there something else I need to #include besides OctoWS2811.h and Arduino.h?
    Thanks!

  5. #5
    OK, I downloaded the latest version from GitHub and figured out how to overwrite the old version in the PlatformIO Projects/<myproject>/.pio/libdeps/teensy40/OctoWS2811 folder.

    That fixed the compile errors. Now back to testing...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •