TuryRx / Banana-pi-m2-zero-GPIO

gpio pin configuration and use project on Bananapi m2 zero board
38 stars 8 forks source link

One Wire #11

Open zacilaci opened 1 year ago

zacilaci commented 1 year ago

Hi!

Can you help me to get one wire working for a WS2812 led strip? I have added overlays=w1-gpio to /boot/armbianEnv.txt, but no python libraries seem to work for it sadly.

Thank you for your help in advance!

TuryRx commented 1 year ago

Hello friend, I hope you have a good day. Look, right now I don't have neopixel leds but if I remember correctly, these are handled with the adafruit-circuitpython-neopixel library.

You install it from the console with sudo pip3 install adafruit-circuitpython-neopixel.

but you will need a 1n4001 diode for the connection. I am attaching a link where you can see its connection.

https://learn.adafruit.com/assets/64122 https://learn.adafruit.com/neopixels-on-raspberry-pi/raspberry-pi-wiring

only that in this case you will have to use one of these pins as control either pin 7, 29, 31, in any case I would recommend 7 since this is the only one that handles pwm and otherwise you would have to use a PCF8574 to have more pwm pins handy

zacilaci commented 1 year ago

I tried hacking it, using it as intended nothing helped sadly.

TuryRx commented 1 year ago

Could you explain this to me a little better? The truth is that I didn't understand you.

zacilaci commented 1 year ago

Of course, my bad. So I installed everything from you libraries I installed the neopixels library, but it still says that the hw is not supported. So I started to look into it deeper, and It seems that the Neopixels Boards does list the BPI M2 Zero as an available board however the neopixels as the one wire protocol, library is missing from this board type. I tried to make it work, however I was unable to.