-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLamp.h
42 lines (39 loc) · 942 Bytes
/
Lamp.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
#ifndef LAMP_H
#define LAMP_H
#include "FastLED.h"
class Lamp
{
public:
Lamp(CRGB *ledarr, int numberofleds, int cols);
~Lamp();
void render();
int on();
void turnOff();
void turnOn();
int switchAnimation();
void nextAnimation();
int getRows();
void setRows(int rows);
int getCols();
void setCols(int cols);
int getNumLeds();
void setNumLeds(int numberofleds);
void setLed(int led, CRGB led_value);
CRGB getLed(int led);
CRGB* getLeds();
void setLeds(CRGB (* ledarr));
//these probably don't belong here, but whatever
void fill_color(int start, int end, CRGB color);
void fill_row(int row, CRGB color);
void fill_column(int col, CRGB color);
uint16_t XY( uint8_t x, uint8_t y);
protected:
CRGB* leds;
int is_on = 1;
int next_animation = 0;
int num_leds = 50;
int cols = 5;
int rows = 10;
private:
};
#endif // LAMP_H