KittyHawk 4 Posted February 21, 2015 Share Posted February 21, 2015 Library for MSP430 internal temperature sensor usage. This sensor is not very precise but can be used if necessary.You can access source code and see example file here:https://github.com/JFF-Bohdan/msp430intertempsensorNotice, that you can use float values for temperature or int16 (also with decimal part of temperature value). When using int16 temperature will be returned in this way: 23.5 C will be returned as 235 (0xEB) integer value; 54.3 C will be returned as 543 (0x21F) integer value When using float values (on my MSP430G2553) memory usage will be like this:binary sketch size: 7 625 bytes (of a 16 384 byte maximum)When using int16 memory usage will be:binary sketch size: 3 359 bytes (of a 16 384 byte maximum) OzGrant and bluehash 2 Quote Link to post Share on other sites
bluehash 1,581 Posted February 22, 2015 Share Posted February 22, 2015 @@KittyHawk Thanks for sharing! Library for MSP430 internal temperature sensor usage. This sensor is not very precise but can be used if necessary.You can access source code and see example file here:https://github.com/JFF-Bohdan/msp430intertempsensor Quote Link to post Share on other sites
B@tto 51 Posted April 7, 2015 Share Posted April 7, 2015 Thanks for sharing But I found an error : pinMode(TEMPSENSOR, INPUT) is not needed at all as TEMPSENSOR is not a pin and just an entry of the analog multiplexer. And moreover, it drives the real pins. I found this bug because when a measured the temperature, a led on pin P2_2 shuted off. And both led and temperature measurement worked well after pinMode() was erased. Finally as there is only one temperature sensor, you can add pre-instanciation in your library. And I think init() phase is not very useful as a dedicated function. Including it in update() would be better. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.