Skip to content

Instantly share code, notes, and snippets.

@mfiumara
Created October 2, 2022 20:05
Show Gist options
  • Save mfiumara/9fcb479596b07ef2901ba4970af3e449 to your computer and use it in GitHub Desktop.
Save mfiumara/9fcb479596b07ef2901ba4970af3e449 to your computer and use it in GitHub Desktop.
MQTT set-up
let mqtt_conf = MqttClientConfiguration {
client_id: Some("my-esp32"),
..Default::default()
};
let (mut mqtt_client, mut connection) = EspMqttClient::new_with_conn(
"mqtt://broker.emqx.io",
&mqtt_conf
).unwrap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment