Adafruit LED Ring

GermainGermain Posts: 1New Member
Hello,

I'm trying to use an Adafruit 12 LED NeoPixel ring (LED Ring)) connected to GPIO but I have some difficulties to drive it on the UP Board.

I found a GITHUB project (Drunkar/NeoPixel-edison-mraa) that able to drive it on an edison card under ubilinux using mraaa library, so I tested it on the Up Board, but I can't set colors correctly, and animations are broken.

I guess there is a problem with WS2812 LED coding and data transfer time, but I don't know how to resolve it...

Could you help me please?
Tagged:

Comments

  • Nicola LunghiNicola Lunghi Posts: 131Emutex mod
    edited November 2017
    Hi
    have a look here
    https://github.com/emutex/Adafruit_Python_GPIO
    Regards
    Nicola Lunghi
  • Nicola LunghiNicola Lunghi Posts: 131Emutex mod
    Hi
    the neopixel required a strict GPIO timing so its very difficult to use it from an up board.
    read here
    https://wp.josh.com/2014/05/13/ws2812-neopixels-are-not-so-finicky-once-you-get-to-know-them/
    It could be better to use led driver that use I2C or SPI as control interfaces.
    Regards
    Nicola Lunghi
  • npurtschertnpurtschert Posts: 6New Member

    Hi
    but there is this library in node-red for the raspberry-pi which uses PWM to control the LEDs:
    https://flows.nodered.org/node/node-red-node-pi-neopixel
    With this library the WS2812 LEDs are working fine.
    Now I am using an UP squared box with linux to control a strip of 8 WS2812 LEDs without any I2C or SPI interface and I am not having success on using the libraries mentioned above.

    Would you please help me?

  • JaneDoJaneDo Posts: 1New Member

    Hello,
    @npurtschert , I also try to control a strip LEDs (ws2811) with the upsquared, and I don't manage to use neoPixel.
    I work on Ubuntu 16.
    Did you, or anyone, find a solution ?

    Otherwise, how could I use I2C or SPI protocol to control this strip ? All of this is new to me...

    Thank you,

  • nukularnukular Posts: 68New Member ✭✭✭

    I have never used these LEDs on a Pi or an UP board, so I can't give you a solution, but generally speaking, you will have to look at the libraries for the Pi and modify them to correctly use the PWM on the UP2.

    You can't use I2C or SPI to control WS2811/2812B LEDs. As Nicola Lunghi said, they require rather specific timing to work properly. Here is an interesting post about that:
    https://cpldcpu.wordpress.com/2014/01/14/light_ws2812-library-v2-0-part-i-understanding-the-ws2812/

    Overall it is not that easy to use these LEDs on the UP2, I would suggest you get a different LED strip instead that uses either WS2801, APA102 or LDP8806 LEDs. These have 2 inputs: Data and Clock. They are much easier to control because they don't require a specific timing on the data pin that is hard to achieve for a board running Linux.

Sign In or Register to comment.