Raspberry Pi RP2040
Inventory
These are RP2040 boards that I have right now.
- 2x RPi Pico
- Adafruit Feather RP2040
- Seeed Studio Sensecap D1 Indicator
- Wiznet EVB hat for a Pico (ethernet)
- Wiznet Pico WS5100S which is the Pico and ethernet on one board
Development
Python
CircuitPython -- make sure you download the correct version, for example, the Rpi Pico version does not work on the Feather. Adafruit recommends you use the latest image, not the stable one.
General notes on VSCode. I gave up on Micropython because there was no working extension that I could find. In retrospect maybe I can get Pymakr going now that I have figured out CircuitPython.
When you fire up a CP board (any, regardless of who made it, if it runs CP), it will mount a drive and set up a serial port. If you edit files it will automatically restart.
- Install CircuitPython on the board.
- Plug in the board. (Powercycle it in other words.)
- Start VisualCode.
- Select the board. There should be a way to do that from the bottom bar.
- Open a serial console, also in the bottom bar. You should see it's CircuitPython in the window.
- Open the folder /media/bwilson/CircuitPy.
- Edit the file code.py and save it. Saving will force reload the script and that should be visible in the console.
Projects
Power management
The idea for this project is to manage a power strip or other interface that can control other equipment including load shedding and watchdog restarts. I want to define an API and talk to it exclusively via MQTT pub/sub messages.
- Track the Ubiquiti link, and reset the link if the remote sites go offline. Can the UBNT do that on its own?
- Bring up power to the other components and shut down when not needed to save power.
- Real time clock calibrated via SNTP
- Use hardware WDT to reset the Pico if it gets stuck.
- Monitor a UPS over the USB port.
- Monitor and reset the onboard ethernet hardware if it gets stuck.
- Configure IP settings in flash. Initial address is 192.168.100.1.
- OTA flash updates
The "other components" under control include a FlexRadio and a Windows computer. Incidentally -- both the full Raspberry Pi and the Intel NUC have built in hardware WDT.
Power - Need a regulated clean supply to feed it 3v3 from 12v power.
Resources
Wiznet
Wiznet did a WiFi + Pico EVB, too, but I can't find it for sale anywhere. https://github.com/Wiznet/WizFi360-EVB-Pico-C/blob/main/getting_started.md
The CircuitPython page for the Wiznet Pico is here https://circuitpython.org/board/wiznet_w5100s_evb_pico/
Sample code: https://github.com/Wiznet/RP2040-HAT-CircuitPython