FUCKING A!
I have a #Rust programme on my #RaspberryPi #PicoW that reads data (an u16) from a sensor and you can then get that data from a web request. HUGE ACHIEVEMENT.
It has taken me like… a large chunk of three days… To get to this point from having code that reads the sensor and serves web requests.
I feel like a moron. But hey, I've only been coding Rust for ~5 days. Probably taking the hard path by going straight into embedded with no::std…
It has taken so many attempts to get to grips with scopes, mutables, Rust's bloody intense syntax, etc, etc… but in the end I've worked out a way to pass a u16 to both spawned workers via some sort of a Mutex. I think I might have an extra level of indirection I don't need… but fuck it, I'll take that I can do this at all as a win.
Now I can take it outside (i.e. not USB-tethered) and see what it reads as an outdoor CO2 PPM measurement.
(I could have had this working in C++ in… minutes, but no, I'm a masochist.)