Skip to content

A very basic show-case of rust on the esp32 in 2022

Notifications You must be signed in to change notification settings

mfiumara/rust-iot-2022

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Readme

This example code does the following:

  1. Set up a WiFi connection on the ESP32-C3
  2. Spawn a thread using std::thread in which we listen for incoming MQTT events.
  3. In the newly spawned thread, handle MQTT events and look specifically for a Received event using match, then print the contents as a string in the console.
  4. Back in our main thread, subscribe to a topic and create an infinite loop in which we continuously publish to an MQTT topic, with pauses of 1 second in between.

Accompanying article

About

A very basic show-case of rust on the esp32 in 2022

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages