Ardruino or GPIO

  • Do you run your LED's directly from the Pi or via a microcontroller? 12

    1. Yeah, Directly from the Pi (5) 42%
    2. No, Always via a microcontroller (7) 58%

    So this has always been on the back of my mind and when i originally ordered my parts i grabbed a Uno just in case and a few spare Micro Pro Leonardo's, Never used them and opted for hooking the WS2812B up directly to the GPiO - everything worked and the other parts just sat there collecting dust until last night when i fired up the Uno, They worked but i noticed the colours were way off compared to default Hyperion settings using Rpi PWM, blues were more purple etc but no big deal as i saw a section in the sketch to calibrate them.


    Question is with Hardware constantly increasing on the Pi, are there any advantages over using an Ardruino or similar board rather than using GPIO/SPI, 1 of the main reasons i can see from my google searches would be my current LED Strip cannot handle PWM for the lights along with on board Audio, whether this is still the case on the Pi4 i do not know.


    I will be upgrading the LEDS in the near future to the APA102's so can run them via the Pi's SPI or I could use an Ardruino, so in 2021 what is the best option or the pros and cons?


    Or is that question like the amd or intel one?

  • Or is that question like the amd or intel one?


    definitely not. you should better ask: WHY should I drive leds from an mcu rather then from rpi...


    it is more about the timing...


    you get good info from the github repo, which we use in hyperion to controll leds


    https://github.com/jgarff/rpi_ws281x#spi


    and a good source for general timing for the neopixels you can find here


    https://cpldcpu.wordpress.com/…understanding-the-ws2812/


    also the library for the mcus are important


    https://blog.ja-ke.tech/2019/06/02/neopixel-performance.html


    and you should also read this one
    https://github.com/FastLED/FastLED/wiki/Interrupt-problems


    then you may understand the "WHY mcu"

  • Last message got deleted but thatnks for the links @TPmodding :thumbsup:


    Ended up going with the default Hyperion FastLED as it scored good and compatible with the Micro


    One of the really cool things I like about it is the size of the Micro, small enough to solder right up at the original connection and small enough to hide it in a bit of heatshrink then a usb plug to the device.


    First few days i felt the colours were a bit washed out and I did have to tweak my colours a bit as I had the gamma a bit high when using the GPIO but im nearly 90% sure i can see a more wider range of colours right across the board. Switching to that has had no other impact on capture settings or reduced performance so happy days but i was hoping id of hit the 1080 :LOL:

  • I was wondering the same thing. My setup is a rpi4 and an ESP8266 over udpraw (not WLED) and noticed the color changes lag the video by half a second or more and is annoying. I swapped the eSP8266 out to an ESP32 and loaded WLED and it acted even weirder. Seemed more in sync but would pause or stop. I was hoping to not run wires from where the pi is to the TV. So I assume from what I read that going GPIO18 on the rpi is the best solution? 246 LEDs total. Anything else I could look at that would affect lag? I tried lowering the usb capture resolution from Auto and increased the decimation, but if it is a data to led speed issue and not capture then none of that would help anyways.

  • yeah sounds like you are on the right track jamesarm97 - could the half a second delay be from the wireless connection or congestion?


    GPIO will work but as mentioned above - I definitely felt the colours are better when using a MCU with FastLED


    How have you wired your LEDS?



    Sidenote: I just bought a ton of parts so hoping to fully wire the WS2812's with the capacitor to see how it improves the LEDs, then i can take it all apart and test out the wireless ESP boards, got 2 of them to test out :D

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!