DotMatrixDisplay » History » Version 7
Frédéric Blanc, 2020-04-17 16:43
1 | 1 | Frédéric Blanc | h1. DotMatrixDisplay |
---|---|---|---|
2 | |||
3 | h2. Hardware |
||
4 | |||
5 | https://majicdesigns.github.io/MD_MAX72XX/page_f_c16.html |
||
6 | |||
7 | // ESP8266 PIN configuration |
||
8 | #define HARDWARE_TYPE MD_MAX72XX::FC16_HW //PAROLA_HW GENERIC_HW ICSTATION_HW |
||
9 | #define CLK_PIN D5 // Matrix CLK |
||
10 | #define DATA_PIN D7 // Matrix DIN |
||
11 | #define CS_PIN D6 // Matrix DS |
||
12 | |||
13 | 4 | Frédéric Blanc | h2. Software |
14 | |||
15 | code exemple |
||
16 | http://sarakha63-domotique.fr/afficheur-led-matrixled-jeedom/ |
||
17 | |||
18 | https://github.com/MajicDesigns/MD_Parola |
||
19 | |||
20 | 5 | Frédéric Blanc | version light |
21 | |||
22 | document:"code light DotMatrixDisplay" |
||
23 | |||
24 | 6 | Frédéric Blanc | |
25 | mise a jour du code ArduinoJson 5 -> ArduinoJson 6 |
||
26 | |||
27 | 7 | Frédéric Blanc | <pre><code> |
28 | 6 | Frédéric Blanc | // ArduinoJson 5 |
29 | //StaticJsonBuffer<512> jsonBuffer; |
||
30 | //JsonObject& root = jsonBuffer.parseObject((char*)payloadcopy); |
||
31 | //if (!root.success()) { |
||
32 | // ArduinoJson 6 |
||
33 | DynamicJsonDocument root(1024); |
||
34 | DeserializationError error = deserializeJson(root, (char*)payloadcopy); |
||
35 | // Test if parsing succeeds. |
||
36 | if (error){ |
||
37 | 7 | Frédéric Blanc | </code></pre> |
38 | 6 | Frédéric Blanc | |
39 | 1 | Frédéric Blanc | h2. MQTT |
40 | |||
41 | 2 | Frédéric Blanc | topic: DotMatrixDisplay/message |
42 | |||
43 | 1 | Frédéric Blanc | {"text":"ABC°€", |
44 | "priorite":0, |
||
45 | "lum":1, |
||
46 | "pos":2, |
||
47 | "eff_in":9, |
||
48 | "eff_out":9, |
||
49 | "speed":1000, |
||
50 | "pause":100} |
||
51 | 3 | Frédéric Blanc | |
52 | {"text":"Bonjour tous le monde", |
||
53 | "priorite":0, |
||
54 | "lum":1, |
||
55 | "pos":1, |
||
56 | "eff_in":1, |
||
57 | "eff_out":9, |
||
58 | "speed":50, |
||
59 | "pause":100} |