-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNeoMatrix.h
36 lines (28 loc) · 941 Bytes
/
NeoMatrix.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
/*
NeoMatrix - Library for driving WS2812B (aka NeoPixel).
Created by Andreas Venizelou, December 2017.
Released into the public domain.
*/
#pragma once
#include "Arduino.h"
class NeoMatrix {
public:
NeoMatrix(int width, int height);
NeoMatrix(int width, int height, int secondary);
~NeoMatrix();
void setPixel(int x, int y, byte r, byte g, byte b);
void setPixel(byte* buff, int x, int y, byte r, byte g, byte b);
byte* getPixel(byte* buff, int x, int y) const;
void multiply(double v);
void add(byte v);
void subtract(byte v);
bool isNotBlack(byte* buff, int x, int y) const;
bool isLineFull(byte* buff, int y) const;
void refresh() const;
void pushBuffer(byte* buff) const;
byte* screen_buffer;
private:
int width;
int height;
int length;
};