Hi guys
I have been teaching myself MCU and C randomly for a few months now (mainly through making stuff, if anything I don't know, google it).
So I recently making a temperature sensor with my new msp430 launchpad, dh11 temperature sensor and display it on a lcd0802(something like lcd1602), I got it working except I want to calculate the dew point, and I am stucked.
my code is:
I couldn't get the same answer as my calculator, so what am I missing here? what do I need to google to get it work?
Thanks guys!
I have been teaching myself MCU and C randomly for a few months now (mainly through making stuff, if anything I don't know, google it).
So I recently making a temperature sensor with my new msp430 launchpad, dh11 temperature sensor and display it on a lcd0802(something like lcd1602), I got it working except I want to calculate the dew point, and I am stucked.
my code is:
Rich (BB code):
uint8_t calculate_dew_point(float temp, float r_humidity)
{
return pow((r_humidity/100),(1/8))*(112+0.9*temp)+0.1*temp-112;
}
Thanks guys!