Files
pico-time/README.md
T
gballan 8b4167f7cc
ci/woodpecker/push/woodpecker Pipeline was successful
Fixing small typo in README
2026-09-08 21:44:58 -04:00

59 lines
2.8 KiB
Markdown

# Pico Time
![Woodpecker CI badge](https://builds.metaunix.net/api/badges/93/status.svg)
![shields.io version badge](https://img.shields.io/gitea/v/release/BitGoblin/pico-time?gitea_url=https://git.metaunix.net)
A [MicroPython](https://micropython.org/) app to display local time on an SSD1306 display.
## 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 NTP servers!
* Also a Raspberry Pi Pico W *should* work too, but I haven't tested it yet
* 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 sensor or board you're in submit an issue or pull request!
### 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
These are not necessary to run the app, but can be useful for testing and/or flashing several nodes.
## Software Deployment
### Requirements
* [MicroPython](https://micropython.org/download/) - MicroPython downloads
* [mpremote](https://docs.micropython.org/en/latest/reference/mpremote.html) - MicroPython remote serial tool
* (Linux users) Your user should be a part of the `dialout` group
### Steps
1. Connect your SSD1306 display to your Pico.
2. Connect your Pico to your PC via a micro-USB to USB type-A cable.
3. [Flash your Raspberry Pi Pico with MicroPython](https://docs.micropython.org/en/latest/rp2/tutorial/reset.html).
1. This has been tested with MicroPython 1.29, but other versions should work.
4. Clone this git repository: `git clone https://git.metaunix.net/BitGoblin/pico-time`.
5. `cd` into the repo: `cd pico-time`.
6. Install Python dependencies via mpremote: `xargs mpremote mip install < requirements.txt`.
7. Copy `config.example.py` to `config.py` and edit the settings to match your environment.
8. Copy the Python code over to the Pico:
1. `mpremote cp main.py :main.py`
2. `mpremote cp config.py :config.py`
9. Reset the Pico: `mpremote reset`
If it worked you should see the display show a message about connecting to WiFi, then syncing time and finally displaying the local time. If it failed, you can monitor the app via `mpremote repl` or using an IDE like [Thonny](https://thonny.org/).
## License
This project is made available under the BSD 3-Clause license.