Loading...
 
Skip to main content

System Workbench for STM32


Reading analog sensors

I'm working on a project with the STM32L475 low power MCUs that will read from an analog MQ135 gas sensor to be able to report air quality. Anyone have any sample code they can share? Would this be an ADC project or GPIO?

Also - how can I get a timestamp in real human readable time (aka a UTC timestamp) ?

And yes - all in freeRTOS.

Pete

The MQ135 appears to have both analog and digital out pins.

So this question: "Would this be an ADC project or GPIO?" is yes 😊

"how can I get a timestamp in real human readable time" - have you thought this project through?

You can use a RTC that gets "set" somehow. "Human readable" - have you heard of "sprintf" and "printf"?