-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMatrixLicht.h
63 lines (43 loc) · 1.45 KB
/
MatrixLicht.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef MatrixLicht_h
#define MatrixLicht_h
//#include <Adafruit_GFX.h> // Core graphics library
#include <RGBmatrixPanel.h> // Hardware-specific library
#include <ClickEncoder.h>
#include "RGB_LED.h"
class MatrixLicht {
public:
MatrixLicht(RGB_LED rotary_led);
// to be called in setup
void setup();
// to be called in each loop
void loop();
void startSetting();
bool isSettingFinished();
// to be called in loop on color set
void setWithRotaryEncoder(ClickEncoder *encoder, int step, ClickEncoder::Button b);
void sendSelectedColorToMatrix();
// Kreisanimation fuer Alarm
void alarmAnimation();
void black();
private:
void Grundeinstellung();
void brightness(int s);
void rainbow(int schritt );
void rgb_ausgabe(int red, int green, int blue);
void printToSerialModus();
void printToSerialRgb(int red, int green, int blue);
void printToSerialHelligkeit(int hell, int hell2);
// Zustaende waehrend des Setzens
int rainbow_einstell_modus = 0; // 0:Grundeinstellungen 1:Farbe 2:Helligkeit 3:Farbe an Matrix
int rainbow_rgb_phase = 1; // rainbow RGB phasen 1:RG 2:GB 3:BR 4:White
// rgb of rotary encoder
RGB_LED rotary_led;
//Helligkeitswerte der RGB LEDs (Aus:0 An:255)
int valueRed;
int valueGreen;
int valueBlue;
// Helligkeit insgesamt (100:hell 0:aus)
int hell;
int animation_count;
};
#endif //MatrixLicht_h