1. New to Christmas lighting? Get started with the AusChristmasLighting 101 Manual:
    auschristmaslighting.com/wiki/AusChristmasLighting-101

OctoWS2811 Library

Discussion in 'RGB Lights - Intelligent Pixels and 3-Channel RGB' started by PaulStoffregen, Feb 27, 2013.

  1. PaulStoffregen

    PaulStoffregen New Elf

    Joined:
    Feb 27, 2013
    Messages:
    7
    Likes Received:
    0
    I recently published a new library called OctoWS2811, for driving large WS2811-based LED display at video refresh speeds. Yesterday it was mentioned on Hack-a-Day, Adafruit and some other blog sites.

    Just wanted to share it here. Hope you like it? :)

    http://youtu.be/M5XQLvFPcBM
     
  2. David_AVD

    David_AVD Bite my shiny metal ass!

    Joined:
    Jun 12, 2010
    Messages:
    3,525
    Likes Received:
    75
    Location:
    Victoria Point (Brisbane)
    Find Me On:
    Hi Paul,
    I saw that yesterday. Very neat. :)
     
  3. Skunberg

    Skunberg Full Time Elf

    Joined:
    Jul 10, 2010
    Messages:
    194
    Likes Received:
    0
    Location:
    Eagan
    Sweet! Worthwhile project. Wish I could make use of it now.
     
  4. BradsXmasLights

    BradsXmasLights WiFi Interactive

    Joined:
    Dec 23, 2010
    Messages:
    506
    Likes Received:
    10
    Location:
    Brisbane, Australia
    Find Me On:
    That looks really cool - and much cheaper than using a PIX8 or P12 controller.

    Now I just need a way to directly drive the frame buffer from PC and it will fit in quite nicely with my existing plans. 8)


    Library link: http://www.pjrc.com/teensy/td_libs_OctoWS2811.html
     
  5. BradsXmasLights

    BradsXmasLights WiFi Interactive

    Joined:
    Dec 23, 2010
    Messages:
    506
    Likes Received:
    10
    Location:
    Brisbane, Australia
    Find Me On:
    Dumb question - but will this library work on any arduino board? Or does it have to be a Teensy board?
     
  6. OP
    OP
    PaulStoffregen

    PaulStoffregen New Elf

    Joined:
    Feb 27, 2013
    Messages:
    7
    Likes Received:
    0
    OctoWS2811 requires the DMA controller on Teensy 3.0. It will not work on any other Arduino compatible boards, not even the Teensy 2.0 ones.
     
  7. SmartAlecLights

    SmartAlecLights Im a SmartAlec what can i say! Community Project Designer

    Joined:
    May 4, 2010
    Messages:
    1,205
    Likes Received:
    12
    Location:
    S.A.
    Find Me On:
    i cant believe the Teensy board is only $19,http://www.pjrc.com/store/teensy3.html
    I think this is definitely a project i must take on..
    this could be alot of fun..

    thanks for sharing..
     
  8. fasteddy

    fasteddy I have C.L.A.P Global Moderator Generous Elf

    Joined:
    Apr 26, 2010
    Messages:
    6,497
    Likes Received:
    22
    Location:
    Albion Park NSW
    Find Me On:
    This is a great cheap way of running lots of pixels, thanks for sharing
     
  9. vincerules

    vincerules Full Time Elf

    Joined:
    Aug 3, 2012
    Messages:
    100
    Likes Received:
    0
    Can't watch this now but definitely need to check this out tomorrow.
     
  10. dpavisic

    dpavisic Full Time Elf

    Joined:
    May 12, 2010
    Messages:
    211
    Likes Received:
    0
    Location:
    Sydney
    Pardon my ignorance, but is this a board that replaces something like the P12R? I can't seem to find too much info on thw website that I can understand exactly how this would hook up to something like LSP?


    Cheers
     
  11. BradsXmasLights

    BradsXmasLights WiFi Interactive

    Joined:
    Dec 23, 2010
    Messages:
    506
    Likes Received:
    10
    Location:
    Brisbane, Australia
    Find Me On:
    Not exactly Danny.

    I would say it's like a P12R but without the Ethernet interface - and the embedded software to decode E1.31 data. This board is more of a pixel driver to generate the required serial data. You'd need your own PC connected (via USB) running custom software to receive E1.31 from your sequencer of choice and then do your own processing/octoWS2811 API from there. This is what I'm considering doing for my matrix this year.
     
  12. OP
    OP
    PaulStoffregen

    PaulStoffregen New Elf

    Joined:
    Feb 27, 2013
    Messages:
    7
    Likes Received:
    0
    I'm planning to work on OctoWS2811 version 1.1 sometime between now and Maker Faire on May 18-19.

    So far, I've been planning 3 features, another Processing-based example using live video, gamma correction for video, and DMX receive.

    Perhaps I should consider adding E1.31 receive using the Ethernet library?

    I found the E1.31 draft revision 0.46 spec. It looks pretty straightforward. Does anyone know if the final E1.31 spec is substantially different? Or if anyone reading this has a copy of the final E1.31 spec and would be willing to help me out, please email me directly: paul at pjrc dot com. I promise I will not repost the spec. I'll only use it to add E1.31 support to OctoWS2811.
     
  13. BradsXmasLights

    BradsXmasLights WiFi Interactive

    Joined:
    Dec 23, 2010
    Messages:
    506
    Likes Received:
    10
    Location:
    Brisbane, Australia
    Find Me On:
    Yes yes yes - you will become a god if you can add E1.31 natively!!! 8)

    E1.31 is very easy to program, Listen on UDP 5568, the E1.31 packet has a header with some sequence/packet-order numbering info that I ignore anyway; universe number, followed by at least 1 to a max of 512 bytes of DMX brightness levels, eg 0 = off, 255 = full on.

    Here's some VB6 code I've ripped from my app - hopefully it's all there :D
    Code:
    WinsockDMX1.GetData RawData
    dmxlength = Len(RawData) - 127
    
    'E1.31 header debug...
    'For a = 1 To 127
    'Debug.Print a & " = " & Asc(Mid(RawData, a, 1)) & " = " & Mid(RawData, a, 1)
    'Next
    Universe = CLng(Asc(Mid(RawData, 115, 1)))
    'Process each DMX Channel
    For z = 0 To dmxlength
         If z <= 509 Then
         'Remember our previous channel values for calculating RGB later
            
         'Get DMX channel's value
         channelValue = Asc(Mid(RawData, 127 + z, 1))
            
         'Every third DMX Channel, calculate the RGB value based on the two previous DMX values
         If z > 0 And (z Mod 3 = 0) Then
             RGBcolourOriginal = RGB(LastChannelValue2, LastChannelValue, channelValue)
         end if   
                 
         'Remember our previous channel value for calculating RGB later
         LastChannelValue2 = LastChannelValue
         LastChannelValue = channelValue 
         end if  
    next z
     
    
    Processing wise, receiving Multicast E1.31 is the same normal unicast UDP, just with a different UDP stack binding to begin with.
     
  14. David_AVD

    David_AVD Bite my shiny metal ass!

    Joined:
    Jun 12, 2010
    Messages:
    3,525
    Likes Received:
    75
    Location:
    Victoria Point (Brisbane)
    Find Me On:
    Download the official copy for free here. DMX stuff is also now on the free list. Get them before they change their mind! :)
     
  15. SmartAlecLights

    SmartAlecLights Im a SmartAlec what can i say! Community Project Designer

    Joined:
    May 4, 2010
    Messages:
    1,205
    Likes Received:
    12
    Location:
    S.A.
    Find Me On:
    Does this help ya http://www.deskontrol.net/blog/arduino-based-artnet-node-for-led-pixels/

     

Share This Page