-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathledcontroller.h
48 lines (36 loc) · 1.13 KB
/
ledcontroller.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
#define FASTLED_INTERNAL
#include <FastLED.h>
#ifndef _LED_CONTROL_
#define _LED_CONTROL_
#define MATRIX_W 30
#define MATRIX_H 10
// How many leds in your strip?
#define NUM_LEDS (MATRIX_W * MATRIX_H)
#define DATA_PIN 12
// GPIO18 - VSPISCK
//#define DATA_PIN 18
// Controller State
#define STRING_DISPLAY 0
#define BACKGROUND_ONLY 1
#define BACKGROUND_STRING_DISPLAY 2
#define MODE_CLOCK 3
#define BACKGROUND_MODE_CLOCK 4
// Methods
void SetupLeds();
void LedLoop();
void SetBrightness(float v);
void SetBackgroundBrightness(float v);
void SetBackgroundColor(CRGB color);
void Clear();
void ResetToBackground();
void SetBackground(int x, int y, CRGB color);
void SetMode(int mode);
void LedPrint(const char *text, CRGB color);
void LedPrintAt(int x, int y, const char *text, CRGB color);
void LedPrintSetColor(CRGB color);
void SetScrollSpeed(int);
int WriteCharAt(int x, int y, uint8_t charToPut, CRGB fgColor);
int WriteCharAt(int x, int y, uint8_t charToPut, CRGB fgColor, CRGB bgColor);
int WriteStringAt(int x, int y, const char *str, CRGB fgColor);
int WriteStringAt(int x, int y, const char *str, CRGB fgColor, CRGB bgColor);
#endif