Project

General

Profile

DotMatrixDisplay » History » Version 8

Frédéric Blanc, 2020-04-17 17:06

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 8 Frédéric Blanc
h3. To Do
40
41
rendre la configuration MQTT dynamique
42
43 1 Frédéric Blanc
h2. MQTT
44
45 2 Frédéric Blanc
topic: DotMatrixDisplay/message
46
47 1 Frédéric Blanc
{"text":"ABC°€",
48
"priorite":0,
49
"lum":1,
50
"pos":2,
51
"eff_in":9,
52
"eff_out":9,
53
"speed":1000,
54
"pause":100}
55 3 Frédéric Blanc
56
{"text":"Bonjour tous le monde",
57
"priorite":0,
58
"lum":1,
59
"pos":1,
60
"eff_in":1,
61
"eff_out":9,
62
"speed":50,
63
"pause":100}