Skip to content

A simple project demonstrating the use of the embassy crate to communicate with the Raspberry Pi Pico via WiFi.

License

Notifications You must be signed in to change notification settings

bartweber/embassy-rp-cyw43-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

POC - How Embassy enables wireless communication for the Raspberry Pi Pico

A simple project demonstrating the use of the embassy crate to communicate with the Raspberry Pi Pico via WiFi. For one of my projects I want to use the Pico for measurements. The measurement data is to be sent to a gateway using the CYW43 WiFi module. Most of the firmware is just a copy of the Embassy examples. All credits go to Dario Nieuwenhuis and contributors. The protocol is mostly a copy from the demo repo of Michael Kefeder's presentation at the Rust Zürisee Meetup March 2023. Great thanks to him for his great talk. This simple project, could be a starting point for further development.

Wireless ping pong using Embassy & Postcard

With the help of Embassy, on the Raspberry Pi Pico we set up a server that listens for incoming messages (in this case a.k.a. postcards 😉). On the other side, we have a client that sends messages to the server. The server then responds to the client with a "Pong" message.

Requirements

  • Raspberry Pi Pico
  • Raspberry Pi Debug Probe (or any other debugger)
  • some micro-usb cables
  • probe-rs installed on your computer (see their website for the details: probe.rs
  • cargo and rustup installed on your computer

Installation and setup

  1. Clone the repository: git clone https://github.com/bartweber/embassy-rp-cyw43-poc.git
  2. Power up your Raspberry Pi Pico.
  3. Connect your Raspberry Pi Pico to your computer with a debugger, for example, a Raspberry Pi Debug Probe.
  4. Configure the WiFi settings in firmware/config.toml. An example configuration is in the file firmware/config.toml.example.
  5. Open two terminals.
    • In one terminal, flash the firmware to the Raspberry Pi Pico by running: cd firmware && cargo run.
    • In the other terminal, run the client side code by: cd clien && cargo run

If all is set up well, the RP Pico will try to connect to your Wi-Fi network and the client will start sending "Ping" messages to the server. The server will respond with "Pong" messages.

About

A simple project demonstrating the use of the embassy crate to communicate with the Raspberry Pi Pico via WiFi.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published