Skip to content

thomasza92/rp2040-webclock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rp2040-webclock

This program runs on a Pico W with an ssd1306 display. I am using a Picobricks base kit with a Pico debug probe.

Here it is all hooked up:

image info

It connects to Wi-Fi and makes a web request to https://worldtimeapi.org/ Then it starts a timer and updates clock by the second.

Date and time are formatted like so: MM/DD/YYYY HH:MM:SS XM

I wanted to explore embedded programming with Rust and this kit is easily available for purchase but I found it difficult to find examples on how to get up and running quickly. Hopefully if you are in the same scenario this could prove useful for you.

To connect the Pico debug probe I found this very helpful schematic:

image info

The grey cable that comes with the Pico debug probe goes into the port labeled 'DEBUG' on the RP2040 and then into the port labeled 'D' on the probe. The black, orange and yellow cable (UART) then goes into the corresponding GND (black), RX (yellow), and TX (orange) locations on the bottom right and the other end into the port labeled 'U' on the probe.

To run the code should be as easy as:

  1. Editing the following lines with your own Wi-Fi information and time zone:
const WIFI_NETWORK: &str = "network_ssid"; // change to your network SSID
const WIFI_PASSWORD: &str = "network_pass"; // change to your network password
let url = "https://worldtimeapi.org/api/timezone/EST"; // change to your timezone
  1. Installing probe-rs
cargo install probe-rs-tools --locked
  1. Connect the Pico debug probe & the RP2040 to your PC

  2. Run the program

cargo run

About

Calendar / clock example for the Pico W using Embassy

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors