blob: 8f2f1a62e07d6d8a406954a1cdea2280b2d68967 (
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
34
35
36
37
38
39
|
/*
* Copyright 2020 Daniel Friesel
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#ifndef MMSIMPLE_H
#define MMSIMPLE_H
class MicroMoodySimple {
private:
MicroMoodySimple(const MicroMoodySimple ©);
unsigned char const address;
unsigned char txbuf[3];
void sendCmd(unsigned char byte);
public:
MicroMoodySimple(unsigned char const addr) : address(addr) {}
void off();
void red();
void redOn();
void redOff();
void green();
void greenOn();
void greenOff();
void blue();
void blueOn();
void blueOff();
void toggleRed();
void toggleGreen();
void toggleBlue();
void setBrightness(unsigned char red, unsigned char green);
};
extern MicroMoodySimple moody;
#endif
|