Finding a compatible library to use with my digi xbee microcontroller to control adressable led strips. #12461
Replies: 4 comments 3 replies
-
@DagurMooney You might have more luck asking in the Digi forums -- https://forums.digi.com/ You didn't say what sort of LED strip you have though... if they're NeoPixel (WS2812, SK6812, APA104, etc) then you will need firmware support for it (some sort of equivalent of machine.bitstream that we provide in MicroPython). However, if you have any of the SPI-based strips, commonly known as DotStar (APA102, etc), then you might be able to bit-bang the SPI protocol (I don't think the XBee has a hardware SPI controller though). The other option is to use something like an Adafruit Seesaw, which functions as an I2C to NeoPixel bridge. There are a few different versions (each supporting a different maximum strip length) https://www.adafruit.com/product/3657 It should be pretty straightforward to write an I2C driver for the XBee (using machine.I2C) to talk to one of these. |
Beta Was this translation helpful? Give feedback.
-
@DagurMooney As good as the XBEE3 device is, it's major focus is on the XBEE transfer protocol. The support for other interfaces is sparse. As you have seen, bitstream is not implement, and the machine.Pin class is a little bit slow, so that support for WS2812 cannot be implemented by bitbanging. (see issue 55 digidotcom/xbee-micropython#55). APA102 could technically work using Pin bitbanging, but at a clock rate of <200Hz this is no fun. I2C works fine at high speed, such that the converters @jimmo suggested should work. |
Beta Was this translation helpful? Give feedback.
-
It seems most of these seesaw boards require the microcontroller you are using to be able to call various adafruit libraries, as in, you cant program the seesaw directly and from there just send it I2C commands to control the led strips. Your microcontroller would need to have adafruit libraries installed, and using the seesaw library send it neopixel data through I2C. |
Beta Was this translation helpful? Give feedback.
-
You can raise this issue here |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a Digi Xbee3 (which runs micropython) and I intend to control addressable led strips with it. However, when I downloaded the micropython neopixel library from github and put it unto the Xbees file system, I get an error saying that the xbee does not recognize the bitstream function that the machine module imports in the neopixel code. I checked the machine module’s built in functions on the xbee and could see that it does not contain a bitstream function. Does anyone have any suggestions on how I could possibly find a way to control the strips?
Beta Was this translation helpful? Give feedback.
All reactions