summaryrefslogtreecommitdiff
path: root/include/driver/scd4x.h
blob: cafff9f4cfe8068c17de3b8507188856a21baa7e (plain)
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
/*
 * Copyright 2021 Birte Kristina Friesel
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */
#ifndef SCD4x_H
#define SCD4x_H

class SCD4x {
	private:
		SCD4x(const SCD4x &copy);
		unsigned char const address = 0x62;
		unsigned char txbuf[2];
		unsigned char rxbuf[9];

	public:
		SCD4x() {}

		unsigned short co2;
		unsigned short rawTemperature;
		unsigned short rawHumidity;

		void start();
		void stop();

		void startLowPower();

		bool read();
};

extern SCD4x scd4x;

#endif