Arduino Nano RP2040 Connect sends signal for different led strips with same pin
HSVDO opened this issue · comments
-
Arduino board: Arduino Nano RP2040 Connect (with/without headers)
-
Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.16
-
List the steps to reproduce the problem below (if possible attach a sketch or
copy the sketch code in too):
When connecting more than 1 led strip to different digital pins the signal strength is added together and sent as output to the first specified pin. The second pin does not output any signal. When I change the order of the specified pins, the summed signal goes to the second (now configured as first) pin. This gives weird colors as result (see 'current behavior.png'). I tested the code with an Arduino Nano Every and it works fine with that kind of board (see 'expected behavior.png'). I can reproduce this problem with 3 different Arduino Nano RP2040 Connect boards following these steps:
- Connect two neopixel strips to power supply
- Upload sketch to board
- Connect the two led strips to the specified pins (e.g. D6 & D7)
- Connect board to power supply
- Apply power
OR
- Upload sketch to board
- Measure voltage output on specified pins (e.g. D6 & D7)
I have created a pull request #307 for a change to the library that permits up to 8 library instances to be used. So up to 8 independant pixel strands can be controlled, each strand on it's own pin.
Issue resolved with PR #307. Thank you!
@Bodmer thanks for working on this!
Since I couldn't test it before, I tested the new version 1.10.2, but now I run into another error when compiling:
ResolveLibrary(Adafruit_NeoPixel.h) -> candidates: [Adafruit_NeoPixel@1.10.2]
Arduino\libraries\Adafruit_NeoPixel/Adafruit_NeoPixel.h:397:3: error: 'PIO' does not name a type; did you mean 'EIO'? PIO pio = pio0; ^~~ EIO
Using board:
BN: Arduino Nano RP2040 Connect VID: 2341 PID: 005e
OK, it works fine with Earl Philhower's RP2040 board package but I see that the Arduino package throws the error.
I have created a pull request #308 that fixes this.
The fix is that the RP2040 #include files need to be in the header file.
It now works fine with the Arduino Nano RP2040 Connect, too. Thanks! :)