summaryrefslogtreecommitdiff
path: root/include/driver/am2320.h
blob: 39c5f7e73f6b20f5ed97d4fdb791d6f215a28f47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef AM2320_H
#define AM2320_H

class AM2320 {
	private:
		AM2320(const AM2320 &copy);
		unsigned char const address;
		unsigned char txbuf[3];
		unsigned char rxbuf[8];

	public:
		AM2320(unsigned char const addr) : address(addr) {}

		void read();
		unsigned char getStatus();
		float getTemp();
		float getHumidity();
};

extern AM2320 am2320;

#endif