-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserialRGB.h
More file actions
53 lines (40 loc) · 1021 Bytes
/
serialRGB.h
File metadata and controls
53 lines (40 loc) · 1021 Bytes
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
#ifndef SERIAL_RGB_H
#define SERIAL_RGB_H
#include <stdint.h>
//#define DEBUG_SERIAL
#define ERROR_SERIAL
#define TABLE_NANO
//#define COMPUTER_NANO
//#define KITCHEN_ESP
//#define JENKINS_UNO
#ifdef TABLE_NANO
#define NUMPIXELS 42
#define RGB_PIN A1
#endif
#ifdef COMPUTER_NANO
#define NUMPIXELS 38
#define RGB_PIN A5
#define REVERTED
#endif
#ifdef JENKINS_UNO
#define NUMPIXELS 4
#define RGB_PIN A0
#endif
#ifdef KITCHEN_ESP
#include "setup_esp.h" // define this after general RGB-definitions
#endif
#ifndef NUMPIXELS
#error Cannot continue compilation. NUMPIXELS was not set
#endif
#define AMOUNT_CHARS_NEW ((NUMPIXELS *3) +2) // 42*LEDs a 3 RGB-Values + 2 braces
#define AMOUNT_CHARS_OLD 7 // (X,X,X)
#define AMOUNT_CHARS_OLD_DEC 13// (123,123,123) // Used by esp
struct last_rgb_state { // TODO whyn ot use strip.Color instead
uint8_t r;
uint8_t g;
uint8_t b;
};
static last_rgb_state l_rgb;
void oldProtocol(uint8_t red, uint8_t green, uint8_t blue);
void newProtocol(char* buffer_pntr);
#endif