Skip to content

Instantly share code, notes, and snippets.

@mfiumara
Last active October 2, 2022 20:05
Show Gist options
  • Save mfiumara/994defd200b0653ce0fe457c1f6681f9 to your computer and use it in GitHub Desktop.
Save mfiumara/994defd200b0653ce0fe457c1f6681f9 to your computer and use it in GitHub Desktop.
WiFi set-up
// Initialize wifi configuration as a client configuration
let mut wifi = EspWifi::new(
Arc::new(EspNetifStack::new().unwrap()),
Arc::new(EspSysLoopStack::new().unwrap()),
Arc::new(EspDefaultNvs::new().unwrap()),
).unwrap();
wifi.set_configuration(
&Configuration::Client(ClientConfiguration {
ssid: "<SSID>".into(),
password: "<password>".into(),
..Default::default()
})
).unwrap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment