/* control and access functions for Sensirion SHT15 temperature and humidity sensor. Buy one on a nice little breakout board from www.sparkfun.com. eric volpe 4/22/2010 http://heepy.net */ #define CLK_HI() { PORTC |= _BV(5); } #define CLK_LO() { PORTC &= ~_BV(5); } #define DATA_HI() { PORTC |= _BV(4); } #define DATA_LO() { PORTC &= ~_BV(4); } #define DATA_INPUT() { DDRC &= ~_BV(4); } #define DATA_OUTPUT() { DDRC |= _BV(4); } #define DATA ((PINC & _BV(4))>>4) #define SHT15_FLOAT_FUNCS void sht_reset(void); void sht_send_byte(uint8_t byte); uint16_t sht_read(void); uint8_t sht_readstatus(void); void sht_writestatus(uint8_t val); #ifdef SHT15_FLOAT_FUNCS double sht_temp(void); double sht_humidity(void); double sht_humidity_comp(double temp); #endif