Line 59... |
Line 59... |
59 |
Check=i2c_read(0); |
59 |
Check=i2c_read(0); |
60 |
i2c_stop(); |
60 |
i2c_stop(); |
61 |
|
61 |
|
62 |
LSB = LSB >> 2; // trow out status bits |
62 |
LSB = LSB >> 2; // trow out status bits |
63 |
|
63 |
|
64 |
data = (((unsigned int16) MSB << 8) + (LSB << 4)); |
64 |
data = (((unsigned int16) MSB << 8) + (LSB << 2)); |
65 |
return(-46.85 + 175.72*((float)data/0xFFFF)); |
65 |
return(-46.85 + 175.72*((float)data/0xFFFF)); |
66 |
} |
66 |
} |
67 |
|
67 |
|
68 |
float SHT25_get_hum() |
68 |
float SHT25_get_hum() |
69 |
{ |
69 |
{ |
Line 83... |
Line 83... |
83 |
Check=i2c_read(0); |
83 |
Check=i2c_read(0); |
84 |
i2c_stop(); |
84 |
i2c_stop(); |
85 |
|
85 |
|
86 |
LSB = LSB >> 2; // trow out status bits |
86 |
LSB = LSB >> 2; // trow out status bits |
87 |
|
87 |
|
88 |
data = (((unsigned int16) MSB << 8) + (LSB << 4) ); |
88 |
data = (((unsigned int16) MSB << 8) + (LSB << 2) ); |
89 |
return( -6.0 + 125.0*((float)data/0xFFFF)); |
89 |
return( -6.0 + 125.0*((float)data/0xFFFF)); |
90 |
} |
90 |
} |
91 |
|
91 |
|