MODBUS laajempi esimerkki
sht11.h
Go to the documentation of this file.
1 
18 #ifndef SHT11_H
19 #define SHT11_H
20 
21 /* Header files */
22 #include <avr/io.h>
23 #include <avr/interrupt.h>
24 #include <avr/wdt.h>
25 #include <math.h>
26 #include <stdio.h>
27 #include <compat/deprecated.h>
28 
29 
30 /* Macros for sensor handling */
31 #define SCK_YLOS SENSOR_PORT |= (1<<SENSOR_CLK)
32 #define SCK_ALAS SENSOR_PORT &= ~(1<<SENSOR_CLK)
33 #define DATA_ALAS SENSOR_PORT &=~( 1<<(anturi) ) /* PORTA Set bit to 0 */
34 #define DATA_YLOS SENSOR_PORT |= ( 1<<(anturi) ) /* PORTA Set bit to 1 */
35 
36 #define MAX_ANTURI NRO_OF_SENSORS+1
39 /* Timer/Counter definitions */
40 #define SENSOR_TIMER 0x96
41 #define TIMER_DIVIDER 0x02
43 /* Prototypes */
44 void wait(uint16_t time);
45 void humiandtemp(void);
46 
47 #endif
void wait(uint16_t time)
Basic wait.
Definition: util.c:46
void humiandtemp(void)
Communicates with the SHT75 sensors. Retrieves the measurement values from sensors.
Definition: sht11.c:51