This blog post is the sixth of a multi-part series of posts where I explore various peripherals in the ESP32C3 using standard library embedded Rus...
For further actions, you may consider blocking this person and/or reporting abuse
The part where wifi configuration is set,
ssid & password are String32 & String 64 respectively.
"some string".into()throws error saying,
can be resolved by using,
"some string".try_into()That's odd, the example code replicated on Wokwi here builds fine. Additionally, I think the suggested code would still blow an error as
try_into()returns aResultthat needs to be unwrapped.Either way, I referred back to the source of the
embedded-svcfor the same version of the crate being used in the example, in theDefaultimplementation ofClientConfigurationhere,into()is being used as well for theheapless::String<32>andheapless::String<64>types returning the expected type without error.Update: I replicated the issue but in a more recent version of the
embedded-svccrate,try_into().unwrap()seems to solve the issue like suggested. Another option is to used theheapless::Stringfrom_strmethod.Thanks for your input!
Thanks for the great tutorial, helps a lot with getting into rust on esp32.
However i have an issue when trying to compile the application. I'm using a esp32-wroom-32 (xtensa), i've ajusted my target to this and can build/flash simple hello world applications just fine).
I get this error when running cargo run:
core::sync::atomic::AtomicU64error[E0432]: unresolved import
AtomicU64--> C:\Users\jjy19\.cargo\registry\src\index.crates.io-6f17d22bba15001f\esp-idf-hal-0.41.2\src\interrupt.rs:1:26
|
1 | use core::sync::atomic::{AtomicU64, Ordering};
| ^^^^^^^^^
| |
| no
insync::atomicAtomicU32| help: a similar name exists in the module:
seems like it's trying to build 64 bit code to my 32 bit machine?
I get these sometimes. It was an issue with an older release. If you update to the latest crate versions the error should disappear.