Driving an LED strip with XIAO MG24 ( Neopixel / FastLED / ezWS2812 )

Hi there :wave:

I’ve started playing with the XIAO MG24 Sense, trying to drive an LED strip with motion data, then I found issues (besides the IMU issue that was fixed later):

  • MG24 is apparently not supported by Neopixel library yet.
  • also not FastLED library.
  • I can’t find anyone talking in forums or Discord about using MG24 with LED strips yet.

Silicone Labs MG24 does include this library in the core: “ezWS2812 :bulb: - driver for WS2812 LEDs using the hardware SPI or GPIO”

So we’re going to look into the ezWS2812 library tomorrow, and maybe also see if we can add support for the MG24 to Neopixel and/or FastLED.

I was wondering if anyone here might also be trying to drive WS28xx LEDs with this board, and maybe has ideas or suggestions?

Thanks

i would not think you wanted to use spi to control leds

use adafruit neopixel per this device example

Hi there,

So I tested it ,And Indeed it works out of the BOX!

HTH
GL :slight_smile: PJ :v:

This is a riff on the original SL GIT example code HERE….:+1:

2 Likes

I’m pretty new to electronics, so honestly I’m not familiar with SPI yet. Basically I’m looking at the MG24 Sense as an alternative to the nRF52840 Sense for a battery-powered LED device.

Okay awesome so it can be done. Thanks :slight_smile:

I was trying a few sample codes from Neopixel library that I previously ran on the nrf52840 Sense, and couldn’t get anything to light up, so I got stumped.

I see this code is using ezWS2812. Hopefully this library can do what we need… Ideally I would’ve wanted to use FastLED as it’s got useful math functions and other features.

I’ll try this out and share with my buddy who knows more about electronics and coding than me. So far he’s telling me that ezWS2812 is kinda buggy (probably because it’s so new), but maybe it’ll do the thing fine, and we can find ways to mimick the advanced features of the other LED libraries. Otherwise we go down the route of adding hardware support to the other libraries.

1 Like

troubleshooting libraries is educating and fun!

1 Like

Hi there,

If I may… The Nrf52840 has the lowest reproducible Sleep current attainable. PERIOD! and yields the longest battery life. The efficiency between the M4 and the M33 cores is negligible for any LED application. YMMV

HTH
GL :slight_smile: PJ :v:

1 Like