New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Waveshare RP2040-Zero board definition #5820
Conversation
`board.NEOPIXEL` works. Once you have an LED cycling colours, you're 99% done. :-)
There's just the NEOPIXEL on this board, no other LED.
Is this ready for review? It looks ok to me but I'm not sure if you've updated the pinout. The Learn guide is here: https://learn.adafruit.com/how-to-add-a-new-board-to-circuitpython |
@tannewt Thanks, I found the guide and have been looking at the QT PY code and schematics (hurrah for open source hardware) as an example. That said. It builds, installs and the REPL and neopixel work as expected. But I'm unsure about the other pin definitions. I think those SNPS, VBUS and VOLTAGE_MONITOR pins are incorrect. I just copied them over from the Pico code, because the docs pointed heavily to the Pico. And I'm unsure what the default I2C, SPI and UART busses should be. I went with pin 0 and 1 for the UART because those are mentioned as default UART 0 in the docs. I don't know whether the definitions in So ready for review? I don't know. Not quite yet? You tell me :-) |
Correct, default buses are those marked by the silkscreen of the board. SDA and SCL typically for I2C, MOSI, MISO and SCK for SPI and TX and RX for UART. If those names aren't marked then there's no default bus.
The pins.c contents will not cause any auto-init. The
You've got the board to test with so it's up to you. Sounds like you've done a fair bit of testing to start so I'm happy to merge this in now. Folks can always fix/change it later. |
This brings the pins in line with the documented [pinouts]. The only "special" pins: - GP0, GP1 are mentioned as the default UART, so we init them as such and give them the TX and RX alternative names. - GP16 is connected to the onboard neopixel DIN line and we assign it the NEOPIXEL name. (Power of the neopixel is connected to the 3.3V rail, not a pin. See [schematic].) - GP26, GP27, GP28, GP29 have unambiguous ADC designations in the [pinouts], so we assign the `A` analogue names as the Pico board definition does. [pinouts]: https://www.waveshare.com/wiki/RP2040-Zero#Pinouts [schematic]: https://www.waveshare.com/w/upload/4/4c/RP2040_Zero.pdf
If this builds, it should be ready for a merge. I did this in my lunch break, so I don't have the board nor complete build env. But these last changes I did aren't rocket science, and should break the things I already tested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It builds and looks good. Thanks!
Hi, pretty new to Circuit python and wanted to try it on the Waveshare RP2040-Zero. |
@IsaacDynamo The board was added after we already moved towards 7.2.0. You can use the latest build for now, it's pretty stable for the most part. Please let us know if you run into any issues. It's best to file a new issue if there isn't already a related one. Comments on closed PRs and issues are often missed! |
@rcarmo this sounds more like a support issue. What is not working? You should be able to do i2c = busio.I2C(board.GP1, board.GP0) etc. for any pair of I2C pins (I2C0 or I2C1 pair). |
The instant I issue that call I get
Regardless of pin, circuit, device, anything. This leads me to believe the I2C initialization is broken. |
@rcarmo Please open a thread in https://forums.adafruit.com or on discord: https://adafru.it/discord. Include your code and a photo of your wiring, and which version of CircuitPython you are using. Are you using breakouts with pullups? There are other RP2040 boards very similar to this that work fine (e.g., QT Py), and I don't see anything unusual about this board definition. |
board.NEOPIXEL
works. Once you have an LED cycling colours, you're 99% done. :-)Any comments and pointers on how to proceed are welcome. I copied the pin definitions from a different board. This was the shortest path to Blinkenlichten.