2.5 KiB
Pico Clock
Raspberry Pi Pico clock app for an SSD1306 display module.
Made in Go with TinyGo.
Hardware
The following hardware is what I used for a deployment:
- Raspberry Pi Pico 2 W: https://www.amazon.com/dp/B0DRJXPPWL
- The W is VERY important, as without networking it can't reach a time server!
- Elegoo SSD1306 LCD: https://www.amazon.com/dp/B0FSRQG23K
Most (or all?) of these components can be swapped for equivalent components. You just need to make sure the code is compatible with whatever board you choose (not likely), and an SSD1306 display.
Support for other hardware types may come in the future, but if there's a specific board or display module you're interested in then submit an issue or pull request!
Tested On
This app has been tested to work on the following microcontrollers:
- Raspberry Pi Pico 2W
- Raspberry Pi Pico W
Prototyping
To help with debugging/testing deployments, I also used these components:
- Elegoo 400-pin Breadboard: https://www.amazon.com/dp/B01EV640I6
- Freenove Raspberry Pi Pico Breakout Board: https://www.amazon.com/dp/B0BFB53Y2N
- Elegoo 20cm Jumper Cables 120 count: https://www.amazon.com/dp/B01EV70C78
Software Deployment
Requirements
- TinyGo - TinyGo installation guide
Steps
- Clone this git repository
git clone https://git.metaunix.net/BitGoblin/pico-weather. - Copy
config.go.exampletoconfig.goand modify the values to match your environment. - Hold down the BOOTSEL button on your Raspberry Pi Pico 2W.
- Plug in your Pico to a USB port on your PC.
- Wait 2-3 seconds then release the BOOTSEL button.
- Flash the program to the Pico:
tinygo flash -target=pico2-w .. Ortinygo flash -target=pico-w .- Note: On Pop!_OS I needed to open the file browser and mount the RP2350 partition manually while tinygo was attempting the flash, otherwise it would fail.
- Monitor the app:
tinygo monitor.
At this point, you should be able to deploy this. Unplug the Pico, connect your SSD1306 display and power it back on - you should see some messages about it booting up and connecting to Wi-Fi, then it should display the time.
License
This project is made available under the BSD 3-Clause license.