- Mon May 07, 2012 4:59 pm
#144088
I'm using the Pro Micro (3.3v 8MHz) in a project and as I was reading the 32u4 documentation and discovered it has an on-board temperature sensor.
Is there any way to access that via the Arduino IDE? I know it probably wouldn't be as simple as "analogRead(12)" (though that would be lovely). Is there some code I can add or modify though, to access it? The datasheet gives the MUX address for the temperature sensor as 0b100111 but I'm not sure what to do with that.
I did look in the Pro Micro add-on bundle, particularily the wiring_analog.cpp file, and while I could see the steps taken to perform an analog read, I couldn't figure out how exactly it went from something like "analogRead(0)" to having the ADC registers correctly addressed.
Thanks!
Is there any way to access that via the Arduino IDE? I know it probably wouldn't be as simple as "analogRead(12)" (though that would be lovely). Is there some code I can add or modify though, to access it? The datasheet gives the MUX address for the temperature sensor as 0b100111 but I'm not sure what to do with that.
I did look in the Pro Micro add-on bundle, particularily the wiring_analog.cpp file, and while I could see the steps taken to perform an analog read, I couldn't figure out how exactly it went from something like "analogRead(0)" to having the ADC registers correctly addressed.
Thanks!