Comments (9)
Ok after trying a number of different strategies, I'm concluding that it really isn't possible. Here's some background of what I tried:
I was running into issues with NeoPixels on 2 different pins responding to the same changes. This is because there are 2 PWM channels on the Raspberry Pi that share a number of pins and both of the ones I was using are on PWM0.
The specific parameter options for this dtoverlay can be found with the following command:
dtoverlay -h pwm-2chan
So I enabled the second PWM channel using the pwm-2chan
dtoverlay by adding the following line to my /boot/config.txt
dtoverlay=pwm-2chan,pin=12,func=4,pin2=13,func2=4
The pin functionality can be found on page 102 of the data sheet at https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf.
I confirmed they were set in PWM output with the following command:
raspi-gpio get 12,13
and got the following output:
GPIO 12: level=0 fsel=4 alt=0 func=PWM0_0 pull=DOWN
GPIO 13: level=0 fsel=4 alt=0 func=PWM0_1 pull=DOWN
I ran my test script and got the following error:
RuntimeError: ws2811_init failed with code -11 (Selected GPIO not possible)
Segmentation fault
I did notice that after running the script, the raspi-gpio command now outputs the following:
GPIO 12: level=0 fsel=4 alt=0 func=PWM0_0 pull=NONE
GPIO 13: level=0 fsel=1 func=OUTPUT pull=NONE
This tells me that the rpi_ws281x library is handling changing the pin muxing already and the dtoverlay was probably not necessary. However, it just refuses to cooperate and the issue lies outside of Blinka. Also, the benefit of 1 additional strand is probably not worth it since strands can be chained together already, so I'm going to close this issue.
from adafruit_blinka.
hmm haven't tried it, can you use two neopixel strips with https://github.com/jgarff/rpi_ws281x ? that's what we're basing off of
from adafruit_blinka.
I can run the "test" program in 2 terminals:
sudo ./test -s grb -g 18 -c
sudo ./test -s grb -g 21 -c
And they both run, albeit the strips running off of GPIO21 seem to act a bit weird (regardless if running simultaneously or not).
from adafruit_blinka.
ok i thought it was just one at a time, well, we dont have support yet here is all
from adafruit_blinka.
Would also love to see support for multiple strips at once.
from adafruit_blinka.
I currently use neopixel with python 2.7 and it works with more than 1 strip. But I wanted to use asyncio and I need to upgrade to 3.5+ for that.
from adafruit_blinka.
I've been playing with this and I think it is possible with a workaround and a bit of a rewrite. There's a couple of possible strategies. While the _rpi_ws281x module only natively supports one strip, I'm not sure if that's 1 strip per instance or shared.
One strategy is to initialize a separate instance per GPIO (if it supports multiple instances) and switch between them based on the GPIO passed in. The other strategy is to have a single instance and have it reinitialize and switch every time the gpio changes.
from adafruit_blinka.
Ok, I just came across this: https://github.com/rpi-ws281x/rpi-ws281x-python/blob/master/examples/multistrandtest.py. It looks like it may now support multiple strips.
from adafruit_blinka.
There seems to be a pretty big bug with the rpi_ws281x library that will write the data to both GPIOs once they have been initialized as separate strips. This happened when using multiple instances and adapting the multistrand example above. I think strategy 2 (reinitializing between each write) might be the way to go.
from adafruit_blinka.
Related Issues (20)
- Support for Orange Pi Zero 2W HOT 1
- problem in running code in raspberry pi pico HOT 1
- Bug in pwmio.py introduced with commit e13c0662ce0da9e936c652953aa1d3f9d6b872d5 HOT 1
- Up Board
- not able to run the code HOT 3
- Nanopi neo HOT 1
- New Support: Orange Pi Zero LTS HOT 1
- LED Channel as one of parameters for NeoPixel HOT 4
- Request HOT 1
- Board Request for PCA9685 on Nvidia Jetson Nano HOT 1
- New issue HOT 1
- Jetson Nano -- AttributeError: module 'adafruit_platformdetect.constants.chips' has no attribute 'JH71x0' HOT 2
- FT232H not being recognized in PowerShell HOT 4
- Issue with APDS9960 sensor on Raspberry Pi 3 Model B+ HOT 1
- Add board: BOARD=orangepi3-lts HOT 1
- ADD BANANAPI CM4 BOARD
- ADD BANANAPI CM4 BOARD SUPPORT
- DietPi - Error installing Adafruit-Blinka HOT 1
- any check scripts that should be performed before issuing a PR for adding a new board
- Adafruit-PlatformDetect version 3.66.0 was unable to identify the board HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adafruit_blinka.