You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-15Lines changed: 27 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,20 @@
1
-
# Ardunio Driver for RGB LED Matrix
1
+
# Arduino Driver for Shift Register LED Matrix
2
2
3
-
To use this driver in the Arduino IDE, add the folder `RGB_LED_Matrix_Lib` as a library as described in [this document](https://www.arduino.cc/en/Guide/Libraries).
3
+
This library provides a generalized API to create and drive an image on LED matrix where shift registers, such as the 74HC595 or DM13a, are used to control the rows and columns of the matrix. To use this driver in the Arduino IDE, add the folder `ShiftRegisterLEDMatrixLib` as a library as described in [this document](https://www.arduino.cc/en/Guide/Libraries), or install via the libraries manager in the Arduino IDE.
4
4
5
-
This driver uses SPI to transfer bits to the shift registers.
5
+
This driver uses SPI to transfer bits to the shift registers and uses one timer interrupt.
6
6
7
-
## Arduino ATmega Boards
7
+
Find at more about this library and hardware that it is designed for at:
This library has three general facets: image representation, matrix driver, and animation management.
12
+
13
+
_detailed documentation TBD_
14
+
15
+
# Notes
16
+
## Driver Boards
17
+
### Arduino ATmega Boards
8
18
9
19
The default wiring for connecting the RGB LED Matrix to an Arduino using the ATmega328 micro-controller (e.g., Uno, Nano, etc) is:
10
20
@@ -19,19 +29,12 @@ The default wiring for connecting the RGB LED Matrix to an Arduino using the ATm
19
29
20
30
Note that the SPI MISO pin is unused.
21
31
22
-
## 3.3v Logic Level
23
-
To use the RGB LED Matrices designed in this project with microcontroller boards that use a 3.3V logic level, you must convert the 3.3V logic signals to 5V levels to work with the shift registers. You can easily use a 74HCT125 buffer/line driver chip to do this transformation. For example, you can wire a Teensy 3.6, which is a 3.3v device, to a 74HCT125 chip in the manner shown in the diagram below to get all power and signal lines required to drive the RGB LED Matrix while the Teensy is connected to USB power:
24
-
25
-

26
-
27
-
An alternative to using this 74HCT125 circuit would be to replace the 74HC595 shift registers on the RGB LED Matrix with the 74HCT595 variety. However, this might be more expensive.
28
-
29
-
## Teensy 3.x Boards
32
+
### Teensy 3.x Boards
30
33
Using the Teensy 3.x as the driving micro-controller for the RGB LED Matrix is a good choice because it's higher clock speed will allow your code to do more work without interrupting the PWM activities that are also happening at the driver level.
31
34
32
35
To use this Teensy 3.x driver in the Arduino IDE, add the folder `RGB_LED_Matrix_Lib` as a library as described in [this document](https://www.arduino.cc/en/Guide/Libraries). Also, ensure that the Arduino IDE has been updated to support Teensy development ([see here for more information](https://www.pjrc.com/teensy/td_download.html)).
33
36
34
-
## ESP8266 Boards
37
+
###ESP8266 Boards
35
38
ESP8266 boards are generally 3.3v logic level boards.
36
39
37
40
| LED Matrix Connection | Wemos D1 Mini | NodeMCU | Notes |
@@ -42,15 +45,24 @@ ESP8266 boards are generally 3.3v logic level boards.
42
45
|**CLK**| D5 | D5 | SPI SCK Pin |
43
46
|**LATCH**| D8 | D8 | SS pin |
44
47
45
-
## Color Modes
48
+
### 3.3v Logic Level
49
+
To use the RGB LED Matrices designed in this project with micro-controller boards that use a 3.3V logic level, you must convert the 3.3V logic signals to 5V levels to work with the shift registers. You can easily use a 74HCT125 buffer/line driver chip to do this transformation. For example, you can wire a Teensy 3.6, which is a 3.3v device, to a 74HCT125 chip in the manner shown in the diagram below to get all power and signal lines required to drive the RGB LED Matrix while the Teensy is connected to USB power:
50
+
51
+

52
+
53
+
An alternative to using this 74HCT125 circuit would be to replace the 74HC595 shift registers on the RGB LED Matrix with the 74HCT595 variety. However, this might be more expensive.
54
+
55
+
56
+
## RGB LEB Matrices
57
+
### Color Modes
46
58
This driver can support either 6-bit or 24-bit color. By default, this library uses 6-bit color. You can enable 24 bit color in this library by setting the preprocessor macro `TWENTY_FOUR_BIT_COLOR` to a value of 1 (note, not in your `ino` file, but at compile time for all files). You can do this either by editing the `RGBImage.h` file or setting a compiler flag. However, note that 24 bit color requires more RAM than an Arduino Uno or Nano has. Due its memory requirements, 24 bit color should work on most 32 bit boards and the Arduino Mega 2560. 24 bit color has been tested to work on the following boards:
47
59
48
60
* Teensy 3.6
49
61
* Arduino Mega 2560
50
62
* Wemos D1 mini Lite
51
63
* NodeMCU
52
64
53
-
## Bit Layouts
65
+
###Bit Layouts
54
66
This driver can support two different bit layouts. The default bit layout assumes each RGB LED is a single unit and each column is wired up with the RGB bits consecutively. That is, for a 4x4 matrix, the bit layout would look like this:
55
67
56
68

0 commit comments