LED matrix on the ATmega328p microcontroller or self-made Arduino module. Part One - Development

Good afternoon, Geeks, I want to tell you today about this rather simple and, nevertheless, interesting LED-matrix, which I collected back in 2017 in September. It's time to tell everyone who is at least somehow familiar with electronics and programming how to make such a device in simple and understandable language.

image

This device can be a nice gift or decoration for the shelf of any person.

Components


Let's get started The first thing you need to develop any device is, at a minimum, to prepare all the necessary radio components, or at least the basic components.
image
  1. 150 ohm resistors 0.25 watt - 7 pcs.
  2. Capacitors 50 volts 1 microfarad - 5 pcs.
  3. Quartz resonator 16 MHz - 1 pc.
  4. Comb type connector (18 contacts required) - 1 pc.
  5. Shift register 74ch595 housing DIP - 1 pc.
  6. Panel under the chip 74ch595 DIP package (16 legs) - 1 pc.
  7. LED 5mm 3 volts - 35 pcs.
  8. ATmega328p microcontroller DIP package - 1 pc.
  9. Panel under the ATmega328p microcircuit DIP body (28 legs) - 1 pc.
  10. Mounting plate 5x7 - 1 pc.

I recommend, if necessary, buy flux, solder and soldering iron.

I deliberately do not indicate the brand of wires that will suit you, since I do not have information about their parameters at all. I can advise MGTF, it is quite possible that they will do. If you know which wires are exactly optimal, leave the information in the comments or email me in jsusdev private messages.

I will not advise you on any specific online stores, because it was a long time ago and not true.

Shift register 74ch595


Probably, many newcomers will feel uneasy from understanding the principles of operation of the 74ch595 chip outside this article. Now I will try to explain as much as possible how it works and how it will be useful in a particular case with my LED matrix.

Simply put, the chip is designed to increase the number of digital pins.

Pinout Attention! The drawing has insignificant inaccuracies in the marking of contacts; this is done for easier assimilation and understanding of the work.

image
The most mysterious contacts of management that are of interest:


I'm sure the visual example will help you to understand what is happening better.

image

If not, then I left the interactive version: 74ch595.swf , all the buttons work, you can click.

If you realize how it works, then the only thing left for me is to add a sample code for working with the chip.

This code is only for the final understanding of how it works programmatically. The code that can be downloaded will be in the spoiler below.

int ST = 7; int SH = 6; int DS = 5; digitalWrite(ST, 1); //     for (int i = 0; i < 8; i++) { digitalWrite(SH, 1); //    digitalWrite(DS, 1); // < ---        digitalWrite(SH, 0); //    } digitalWrite(ST, 0); //     

Code that will work
 int ST = 7; int SH = 6; int DS = 5; void setup() { pinMode(7, 1); pinMode(6, 1); pinMode(5, 1); } void loop() { digitalWrite(ST, 1); //     for (int i = 0; i < 8; i++) { digitalWrite(SH, 1); //    digitalWrite(DS, 1); // < ---        digitalWrite(SH, 0); //    } digitalWrite(ST, 0); //     } 


Now that you have mastered the work with the microchip, you can proceed to the next item.

Preparation for the development of the matrix


In my case, the LEDs interfered with each other on the board, and in order for the LEDs to “stand up” on the board it is necessary to grind a small edging, if of course this is required. Attention! It is necessary to grind, because there are still many ways to get rid of it. Since the LEDs are actually very fragile, it is advisable to handle them carefully, the process of watering out in which case I was never given easy.
image
I would like to pay special attention to the capacitors, I can not explain their need in a special language, but without them the LEDs do not fade to the end and from this the device looks non-optimized, the capacitors stabilize the current between the controller and the LED.

image

In the final version, it was the only way to install capacitors, although, I’ll reveal a secret, such a device wasn’t the only one; on one of them, the capacitors were mounted on the back side of one leg in the place where the power supply cable now runs to 74ch595.

Do not worry about the number of wires in the photo, then I will show how everything works.

image

I completely forgot, and you probably missed the fact that only 6 resistors are visually located on the device, but in fact there are 7 of them: one of them is right under 74ch595.

image

It is worth adding that the crystal oscillator (16 MHz) can be replaced by 24 MHz, this will significantly speed up the work, but such changes are applicable only to the finished device, since the ATmega328p is simply not flashed on a 24 MHz crystal oscillator.

Matrix development


Schematic diagram of the device.
image

Attention! The LEDs are located “minus” to ATmega328p and at the same time “plus” to 74ch595. The location of the components on the board.
image
Reverse part (non-capacitor version)
image
3D model that can be rotated in Google SketchUp editor.
The model itself can be downloaded here: 3D_Schema.skp

When we soldered all the components, we can solder the wires.
image
We start:
image
Connect the contacts rx , tx , reset and LEDs . (LEDs are connected by legs cut off from them):
image
We connect power components and a quartz oscillator :
image
Connect the LEDs with 74ch595 :
image
We connect LEDs with ATmega328p and ATmega328p and 74ch595 :
image
We connect capacitors :
image
Congratulations to the physical part finished:
image
Surely the device will not immediately come to life without firmware, but you can try the standard Arduino blink. (Yes, in some cases can really earn).

I Blink earned. If you have at least something on the first row will blink, then everything is OK, if not - read on.

image

Program development


In order for the microcontroller to manage its contacts, they need to be “initialized”.
Yes, I could do otherwise, for example, use an array and a loop to reduce the amount of code in the function. In general, the set of software solutions that I made in the implementation process are disastrous from a position, for example, for programmable memory (Flash), but positive for dynamic (RAM). I managed to reduce the use of dynamic memory from 69% to 23%.
I want to separately note that the lack of dynamic memory is very critical for the device: it can simply hang at any time due to a lack of memory, in this case, the dynamic memory is only 2 KB, and the programmable 32 KB.

Therefore, accept and accept or do better!

 //   void init() { pinMode(5, 1); pinMode(6, 1); pinMode(7, 1); pinMode(9, 1); pinMode(10, 1); pinMode(11, 1); pinMode(12, 1); pinMode(13, 1); digitalWrite(5,0); digitalWrite(6,0); digitalWrite(7,0); digitalWrite(9,0); digitalWrite(10,0); digitalWrite(11,0); digitalWrite(12,0); digitalWrite(13,0); }; 

To control the matrix, I developed such a function. It is key in essence.

 void path(char bits[5]) { for (int l = 0;l < 5;l++) { digitalWrite(9, 1); digitalWrite(10, 1); digitalWrite(11, 1); //      digitalWrite(12, 1); digitalWrite(13, 1); if (l == 1) digitalWrite(13, 0); if (l == 2) digitalWrite(12, 0); if (l == 3) digitalWrite(11, 0); //         if (l == 4) digitalWrite(10, 0); if (l == 0) digitalWrite(9, 0); //      , .   digitalWrite(7, 1); for (int i = 0; i < 8;i++) { digitalWrite(6, 1); digitalWrite(5, (bits[l] >> i) & 1); /* (bits[l] >> i) *     *  10  2,  *    *     */ digitalWrite(6, 0); } digitalWrite(7, 0); delay(2); //         } }; 

Each element of the array is one column of LEDs.

 char Matrx_symbol[5] = { 127, // 1 0, // 2 0, // 3 0, // 4 0 // 5 }; path(Matrx_symbol); 

The columns are numbered from right to left, that is, mirrored to the array.
image
What are these magic numbers in the array?
image
Simply put, a LED column is a byte - 1 bit, which holds the number in the decimal number system from 0 to 127; with this number we determine which LEDs to light up.

Of course, we will not collect our characters by brute or deliberate sorting bits in a byte. I developed a page where you can create any Symbol creater symbol.

image

Everything is extremely simple and easy, we just select the LEDs we need and we get an array that can be used as a symbol.

image

The function in which the characters are defined. Initially, I planned that the function could be improved by expanding the number of characters. Now there are 87 of them, but I assumed that they could be up to 255. But alas, probably, in this release there is not, since the Arduino interpreter does not define characters whose code is higher than 127.

Literally, I just found out about it at 5:31 am

image

A function that converts a string to a set of characters that are enumerated takes two parameters:
  1. the very string "Hellow world!"
  2. the time between switching characters in ms.


A function that converts a string into a set of characters. It takes two parameters: the string “Hellow world!” Itself and the second parameter is the time between switching characters in ms.

Lot of code
 void message(String text, int Delay) { int len = text.length(); for (int i = 0; i < len; i++) { for (int Delay_ = 0; Delay_ < Delay/15; Delay_++){ if (text[i] == 32) { char Symbol[5] = {0,0,0,0,0}; path(Symbol); } // if (text[i] == 43) { char Symbol[5] = {8,8,62,8,8}; path(Symbol); } // + if (text[i] == 45) { char Symbol[5] = {8,8,8,8,8}; path(Symbol); } // - if (text[i] == 61) { char Symbol[5] = {20,20,20,20,20}; path(Symbol); } // = if (text[i] == 95) { char Symbol[5] = {1,1,1,1,1}; path(Symbol); } // _ if (text[i] == 41) { char Symbol[5] = {62,65,0,0,0}; path(Symbol); } // ) if (text[i] == 40) { char Symbol[5] = {0,0,0,65,62}; path(Symbol); } // ( if (text[i] == 123) { char Symbol[5] = {0,65,65,54,8}; path(Symbol); } // { if (text[i] == 125) { char Symbol[5] = {8,54,65,65,0}; path(Symbol); } // } if (text[i] == 62) { char Symbol[5] = {8,20,34,65,0}; path(Symbol); } // > if (text[i] == 60) { char Symbol[5] = {0,65,34,20,8}; path(Symbol); } // < if (text[i] == 46) { char Symbol[5] = {0,0,1,0,0}; path(Symbol); } // . if (text[i] == 44) { char Symbol[5] = {0,0,3,2,0}; path(Symbol); } // , if (text[i] == 63) { char Symbol[5] = {48,72,69,64,48}; path(Symbol); } // ? if (text[i] == 33) { char Symbol[5] = {0,0,125,0,0}; path(Symbol); } // ! if (text[i] == 64) { char Symbol[5] = {58,69,93,65,62}; path(Symbol); } // @ if (text[i] == 35) { char Symbol[5] = {20,127,20,127,20}; path(Symbol); } // # if (text[i] == 36) { char Symbol[5] = {38,73,127,73,50}; path(Symbol); } // $ if (text[i] == 37) { char Symbol[5] = {19,11,4,50,49}; path(Symbol); } // % if (text[i] == 94) { char Symbol[5] = {0,32,64,32,0}; path(Symbol); } // ^ if (text[i] == 58) { char Symbol[5] = {0,0,0,34,0}; path(Symbol); } // : if (text[i] == 42) { char Symbol[5] = {8,20,42,20,8}; path(Symbol); } // * if (text[i] == 38) { char Symbol[5] = {2,53,73,73,54}; path(Symbol); } // & if (text[i] == 34) { char Symbol[5] = {0,112,0,112,0}; path(Symbol); } // " if (text[i] == 59) { char Symbol[5] = {0,0,0,38,2}; path(Symbol); } // ; if (text[i] == 48) { char Symbol[5] = {62,65,65,65,62}; path(Symbol); } // 0 if (text[i] == 49) { char Symbol[5] = {0,1,127,33,16}; path(Symbol); } // 1 if (text[i] == 50) { char Symbol[5] = {49,73,69,67,49}; path(Symbol); } // 2 if (text[i] == 51) { char Symbol[5] = {54,73,73,65,34}; path(Symbol); } // 3 if (text[i] == 52) { char Symbol[5] = {5,127,37,20,12}; path(Symbol); } // 4 if (text[i] == 53) { char Symbol[5] = {6,73,73,73,114}; path(Symbol); } // 5 if (text[i] == 54) { char Symbol[5] = {38,73,73,73,62}; path(Symbol); } // 6 if (text[i] == 55) { char Symbol[5] = {96,80,79,64,64}; path(Symbol); } // 7 if (text[i] == 56) { char Symbol[5] = {54,73,73,73,54}; path(Symbol); } // 8 if (text[i] == 57) { char Symbol[5] = {62,73,73,73,50}; path(Symbol); } // 9 if (text[i] == 97) { char Symbol[5] = {1,62,37,37,18}; path(Symbol); } // a if (text[i] == 65) { char Symbol[5] = {3,28,36,28,3}; path(Symbol); } // A if (text[i] == 98) { char Symbol[5] = {6,9,9,9,126}; path(Symbol); } // b if (text[i] == 66) { char Symbol[5] = {6,57,73,73,127}; path(Symbol); } // B if (text[i] == 99) { char Symbol[5] = {18,33,33,33,30}; path(Symbol); } // c if (text[i] == 67) { char Symbol[5] = {34,65,65,65,62}; path(Symbol); } // C if (text[i] == 100) { char Symbol[5] = {126,9,9,9,6}; path(Symbol); } // d if (text[i] == 68) { char Symbol[5] = {62,65,65,65,127}; path(Symbol); } // D if (text[i] == 101) { char Symbol[5] = {26,37,37,37,30}; path(Symbol); } // e if (text[i] == 69) { char Symbol[5] = {65,65,73,73,127}; path(Symbol); } // E if (text[i] == 102) { char Symbol[5] = {0,32,36,31,4}; path(Symbol); } // f if (text[i] == 70) { char Symbol[5] = {64,64,72,72,127}; path(Symbol); } // F if (text[i] == 103) { char Symbol[5] = {62,73,73,74,48}; path(Symbol); } // g if (text[i] == 71) { char Symbol[5] = {38,73,73,65,62}; path(Symbol); } // G if (text[i] == 104) { char Symbol[5] = {0,7,8,8,63}; path(Symbol); } // h if (text[i] == 72) { char Symbol[5] = {127,8,8,8,127}; path(Symbol); } // H if (text[i] == 105) { char Symbol[5] = {0,0,47,0,0}; path(Symbol); } // i if (text[i] == 73) { char Symbol[5] = {0,65,127,65,0}; path(Symbol); } // I if (text[i] == 106) { char Symbol[5] = {0,94,1,1,2}; path(Symbol); } // j if (text[i] == 74) { char Symbol[5] = {126,1,1,1,6}; path(Symbol); } // J if (text[i] == 107) { char Symbol[5] = {0,16,9,6,63}; path(Symbol); } // k if (text[i] == 75) { char Symbol[5] = {64,33,18,12,127}; path(Symbol); } // K if (text[i] == 108) { char Symbol[5] = {0,1,63,0,0}; path(Symbol); } // l //if (text[i] == 76) { char Symbol[5] = {1,1,1,1,127}; path(Symbol); } // L if (text[i] == 109) { char Symbol[5] = {15,16,24,16,15}; path(Symbol); } // m if (text[i] == 77) { char Symbol[5] = {63,64,56,64,63}; path(Symbol); } // M if (text[i] == 110) { char Symbol[5] = {31,32,32,32,63}; path(Symbol); } // n if (text[i] == 78) { char Symbol[5] = {127,4,8,16,127}; path(Symbol); } // N if (text[i] == 111) { char Symbol[5] = {14,17,17,17,14}; path(Symbol); } // o if (text[i] == 79) { char Symbol[5] = {62,65,65,65,62}; path(Symbol); } // O if (text[i] == 112) { char Symbol[5] = {0,24,36,36,63}; path(Symbol); } // p if (text[i] == 80) { char Symbol[5] = {56,68,68,68,63}; path(Symbol); } // P if (text[i] == 113) { char Symbol[5] = {31,36,36,36,24}; path(Symbol); } // q if (text[i] == 81) { char Symbol[5] = {61,66,65,65,62}; path(Symbol); } // Q if (text[i] == 114) { char Symbol[5] = {0,48,16,32,63}; path(Symbol); } // r if (text[i] == 82) { char Symbol[5] = {56,69,70,68,63}; path(Symbol); } // R if (text[i] == 115) { char Symbol[5] = {0,18,37,41,18}; path(Symbol); } // s //if (text[i] == 83) { char Symbol[5] = {38,73,73,73,50}; path(Symbol); } // S if (text[i] == 116) { char Symbol[5] = {0,2,17,62,16}; path(Symbol); } // t if (text[i] == 84) { char Symbol[5] = {64,64,127,64,64}; path(Symbol); }// T if (text[i] == 117) { char Symbol[5] = {29,2,1,1,30}; path(Symbol); } // u if (text[i] == 85) { char Symbol[5] = {126,1,1,1,126}; path(Symbol); } // U if (text[i] == 118) { char Symbol[5] = {60,2,1,2,60}; path(Symbol); } // v if (text[i] == 86) { char Symbol[5] = {124,2,1,2,124}; path(Symbol); } // V if (text[i] == 119) { char Symbol[5] = {30,1,6,1,30}; path(Symbol); } // w if (text[i] == 87) { char Symbol[5] = {126,1,6,1,126}; path(Symbol); } // W if (text[i] == 120) { char Symbol[5] = {17,10,4,10,17}; path(Symbol); } // x if (text[i] == 88) { char Symbol[5] = {99,20,8,20,99}; path(Symbol); } // X if (text[i] == 121) { char Symbol[5] = {56,4,6,57,0}; path(Symbol); } // y if (text[i] == 89) { char Symbol[5] = {112,8,7,8,112}; path(Symbol); } // Y if (text[i] == 122) { char Symbol[5] = {17,25,21,19,17}; path(Symbol); } // z if (text[i] == 90) { char Symbol[5] = {97,81,73,69,67}; path(Symbol); } // Z if (text[i] == 76) { char Symbol[5] = {24,60,30,60,24}; path(Symbol); } // L if (text[i] == 83) { char Symbol[5] = {6,113,1,113,6}; path(Symbol); } // S } } 


Now that we have “disassembled” the principle of operation of the functions of this program in the controller, we need to arrange it.

A lot of code
 class Jsus { public: void init() { pinMode(5, 1); pinMode(6, 1); pinMode(7, 1); pinMode(9, 1); pinMode(10, 1); pinMode(11, 1); pinMode(12, 1); pinMode(13, 1); digitalWrite(5,0); digitalWrite(6,0); digitalWrite(7,0); digitalWrite(9,0); digitalWrite(10,0); digitalWrite(11,0); digitalWrite(12,0); digitalWrite(13,0); }; void path(char bits[5]) { for (int l = 0;l < 5;l++) { digitalWrite(9, 1); digitalWrite(10, 1); digitalWrite(11, 1); digitalWrite(12, 1); digitalWrite(13, 1); if (l == 1) digitalWrite(13, 0); if (l == 2) digitalWrite(12, 0); if (l == 3) digitalWrite(11, 0); if (l == 4) digitalWrite(10, 0); if (l == 0) digitalWrite(9, 0); digitalWrite(7, 1); for (int i = 0; i < 8;i++) { digitalWrite(6, 1); digitalWrite(5, (bits[l] >> i) & 1); digitalWrite(6, 0); } digitalWrite(7, 0); delay(2); } }; void message(String text, int Delay) { int len = text.length(); for (int i = 0; i < len; i++) { for (int Delay_ = 0; Delay_ < Delay/15; Delay_++){ if (text[i] == 32) { char Symbol[5] = {0,0,0,0,0}; path(Symbol); } // if (text[i] == 43) { char Symbol[5] = {8,8,62,8,8}; path(Symbol); } // + if (text[i] == 45) { char Symbol[5] = {8,8,8,8,8}; path(Symbol); } // - if (text[i] == 61) { char Symbol[5] = {20,20,20,20,20}; path(Symbol); } // = if (text[i] == 95) { char Symbol[5] = {1,1,1,1,1}; path(Symbol); } // _ if (text[i] == 41) { char Symbol[5] = {62,65,0,0,0}; path(Symbol); } // ) if (text[i] == 40) { char Symbol[5] = {0,0,0,65,62}; path(Symbol); } // ( if (text[i] == 123) { char Symbol[5] = {0,65,65,54,8}; path(Symbol); } // { if (text[i] == 125) { char Symbol[5] = {8,54,65,65,0}; path(Symbol); } // } if (text[i] == 62) { char Symbol[5] = {8,20,34,65,0}; path(Symbol); } // > if (text[i] == 60) { char Symbol[5] = {0,65,34,20,8}; path(Symbol); } // < if (text[i] == 46) { char Symbol[5] = {0,0,1,0,0}; path(Symbol); } // . if (text[i] == 44) { char Symbol[5] = {0,0,3,2,0}; path(Symbol); } // , if (text[i] == 63) { char Symbol[5] = {48,72,69,64,48}; path(Symbol); } // ? if (text[i] == 33) { char Symbol[5] = {0,0,125,0,0}; path(Symbol); } // ! if (text[i] == 64) { char Symbol[5] = {58,69,93,65,62}; path(Symbol); } // @ if (text[i] == 35) { char Symbol[5] = {20,127,20,127,20}; path(Symbol); } // # if (text[i] == 36) { char Symbol[5] = {38,73,127,73,50}; path(Symbol); } // $ if (text[i] == 37) { char Symbol[5] = {19,11,4,50,49}; path(Symbol); } // % if (text[i] == 94) { char Symbol[5] = {0,32,64,32,0}; path(Symbol); } // ^ if (text[i] == 58) { char Symbol[5] = {0,0,0,34,0}; path(Symbol); } // : if (text[i] == 42) { char Symbol[5] = {8,20,42,20,8}; path(Symbol); } // * if (text[i] == 38) { char Symbol[5] = {2,53,73,73,54}; path(Symbol); } // & if (text[i] == 34) { char Symbol[5] = {0,112,0,112,0}; path(Symbol); } // " if (text[i] == 59) { char Symbol[5] = {0,0,0,38,2}; path(Symbol); } // ; if (text[i] == 48) { char Symbol[5] = {62,65,65,65,62}; path(Symbol); } // 0 if (text[i] == 49) { char Symbol[5] = {0,1,127,33,16}; path(Symbol); } // 1 if (text[i] == 50) { char Symbol[5] = {49,73,69,67,49}; path(Symbol); } // 2 if (text[i] == 51) { char Symbol[5] = {54,73,73,65,34}; path(Symbol); } // 3 if (text[i] == 52) { char Symbol[5] = {5,127,37,20,12}; path(Symbol); } // 4 if (text[i] == 53) { char Symbol[5] = {6,73,73,73,114}; path(Symbol); } // 5 if (text[i] == 54) { char Symbol[5] = {38,73,73,73,62}; path(Symbol); } // 6 if (text[i] == 55) { char Symbol[5] = {96,80,79,64,64}; path(Symbol); } // 7 if (text[i] == 56) { char Symbol[5] = {54,73,73,73,54}; path(Symbol); } // 8 if (text[i] == 57) { char Symbol[5] = {62,73,73,73,50}; path(Symbol); } // 9 if (text[i] == 97) { char Symbol[5] = {1,62,37,37,18}; path(Symbol); } // a if (text[i] == 65) { char Symbol[5] = {3,28,36,28,3}; path(Symbol); } // A if (text[i] == 98) { char Symbol[5] = {6,9,9,9,126}; path(Symbol); } // b if (text[i] == 66) { char Symbol[5] = {6,57,73,73,127}; path(Symbol); } // B if (text[i] == 99) { char Symbol[5] = {18,33,33,33,30}; path(Symbol); } // c if (text[i] == 67) { char Symbol[5] = {34,65,65,65,62}; path(Symbol); } // C if (text[i] == 100) { char Symbol[5] = {126,9,9,9,6}; path(Symbol); } // d if (text[i] == 68) { char Symbol[5] = {62,65,65,65,127}; path(Symbol); } // D if (text[i] == 101) { char Symbol[5] = {26,37,37,37,30}; path(Symbol); } // e if (text[i] == 69) { char Symbol[5] = {65,65,73,73,127}; path(Symbol); } // E if (text[i] == 102) { char Symbol[5] = {0,32,36,31,4}; path(Symbol); } // f if (text[i] == 70) { char Symbol[5] = {64,64,72,72,127}; path(Symbol); } // F if (text[i] == 103) { char Symbol[5] = {62,73,73,74,48}; path(Symbol); } // g if (text[i] == 71) { char Symbol[5] = {38,73,73,65,62}; path(Symbol); } // G if (text[i] == 104) { char Symbol[5] = {0,7,8,8,63}; path(Symbol); } // h if (text[i] == 72) { char Symbol[5] = {127,8,8,8,127}; path(Symbol); } // H if (text[i] == 105) { char Symbol[5] = {0,0,47,0,0}; path(Symbol); } // i if (text[i] == 73) { char Symbol[5] = {0,65,127,65,0}; path(Symbol); } // I if (text[i] == 106) { char Symbol[5] = {0,94,1,1,2}; path(Symbol); } // j if (text[i] == 74) { char Symbol[5] = {126,1,1,1,6}; path(Symbol); } // J if (text[i] == 107) { char Symbol[5] = {0,16,9,6,63}; path(Symbol); } // k if (text[i] == 75) { char Symbol[5] = {64,33,18,12,127}; path(Symbol); } // K if (text[i] == 108) { char Symbol[5] = {0,1,63,0,0}; path(Symbol); } // l //if (text[i] == 76) { char Symbol[5] = {1,1,1,1,127}; path(Symbol); } // L if (text[i] == 109) { char Symbol[5] = {15,16,24,16,15}; path(Symbol); } // m if (text[i] == 77) { char Symbol[5] = {63,64,56,64,63}; path(Symbol); } // M if (text[i] == 110) { char Symbol[5] = {31,32,32,32,63}; path(Symbol); } // n if (text[i] == 78) { char Symbol[5] = {127,4,8,16,127}; path(Symbol); } // N if (text[i] == 111) { char Symbol[5] = {14,17,17,17,14}; path(Symbol); } // o if (text[i] == 79) { char Symbol[5] = {62,65,65,65,62}; path(Symbol); } // O if (text[i] == 112) { char Symbol[5] = {0,24,36,36,63}; path(Symbol); } // p if (text[i] == 80) { char Symbol[5] = {56,68,68,68,63}; path(Symbol); } // P if (text[i] == 113) { char Symbol[5] = {31,36,36,36,24}; path(Symbol); } // q if (text[i] == 81) { char Symbol[5] = {61,66,65,65,62}; path(Symbol); } // Q if (text[i] == 114) { char Symbol[5] = {0,48,16,32,63}; path(Symbol); } // r if (text[i] == 82) { char Symbol[5] = {56,69,70,68,63}; path(Symbol); } // R if (text[i] == 115) { char Symbol[5] = {0,18,37,41,18}; path(Symbol); } // s //if (text[i] == 83) { char Symbol[5] = {38,73,73,73,50}; path(Symbol); } // S if (text[i] == 116) { char Symbol[5] = {0,2,17,62,16}; path(Symbol); } // t if (text[i] == 84) { char Symbol[5] = {64,64,127,64,64}; path(Symbol); }// T if (text[i] == 117) { char Symbol[5] = {29,2,1,1,30}; path(Symbol); } // u if (text[i] == 85) { char Symbol[5] = {126,1,1,1,126}; path(Symbol); } // U if (text[i] == 118) { char Symbol[5] = {60,2,1,2,60}; path(Symbol); } // v if (text[i] == 86) { char Symbol[5] = {124,2,1,2,124}; path(Symbol); } // V if (text[i] == 119) { char Symbol[5] = {30,1,6,1,30}; path(Symbol); } // w if (text[i] == 87) { char Symbol[5] = {126,1,6,1,126}; path(Symbol); } // W if (text[i] == 120) { char Symbol[5] = {17,10,4,10,17}; path(Symbol); } // x if (text[i] == 88) { char Symbol[5] = {99,20,8,20,99}; path(Symbol); } // X if (text[i] == 121) { char Symbol[5] = {56,4,6,57,0}; path(Symbol); } // y if (text[i] == 89) { char Symbol[5] = {112,8,7,8,112}; path(Symbol); } // Y if (text[i] == 122) { char Symbol[5] = {17,25,21,19,17}; path(Symbol); } // z if (text[i] == 90) { char Symbol[5] = {97,81,73,69,67}; path(Symbol); } // Z if (text[i] == 76) { char Symbol[5] = {24,60,30,60,24}; path(Symbol); } // L if (text[i] == 83) { char Symbol[5] = {6,113,1,113,6}; path(Symbol); } // S } } }; }; Jsus matrix; 


Start code.

 void setup() { matrix.init(); } void loop() { matrix.message("Fuck RKN!", 400); } 

Here you can find a sketch ready for download into the Arduino.

Development results


2018. Current device version:



2017. Current device version (not optimized):



2016. The first test version of the device. Even without chips on the board:



All the necessary links can be found in the repository on the Github project: Arduino-matrix-module .

If the article did not answer any implementation questions, write them in the comments.

Everything seems to have forgotten nothing. Poki smacks benches shops.

Arduino-matrix-module by JSus
image

Source: https://habr.com/ru/post/411695/


All Articles