-
Notifications
You must be signed in to change notification settings - Fork 1
/
E2.h
47 lines (40 loc) · 1.04 KB
/
E2.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
E2.h - E2 library for Arduino
CC-BY-SA
Modified 02/2013 by Romain Bazile ([email protected])
CHANGELOG
#30/01/2013: Initial release
#06/02/2013: Inclusion of Custom mem read and
# replacement of EE03_Status by Status
*/
#ifndef E2_H_INCLUDED
#define E2_H_INCLUDED
#include"Arduino.h"
class E2_Device
{
private:
int _pinSDA;
int _pinSCL;
char check_ack(void);
void send_ack(void);
void send_nak(void);
void E2Bus_start(void); // send start condition
void E2Bus_stop(void); // send stop condition
void E2Bus_send(unsigned char);
void set_SDA(void);
void clear_SDA(void);
int read_SDA(void);
void set_SCL(void);
void clear_SCL(void);
unsigned char E2Bus_read(void); // read one byte from E2-Bus
void e2delay(unsigned int value);
public:
E2_Device(int pinSDA, int pinSCL);
float RH_read(void);
float Temp_read(void);
unsigned char Status(void);
float CO2_read(void);
float CO2mean_read(void);
unsigned char Custom_mem_read(void);
};
#endif