Nextion » History » Version 5
Frédéric Blanc, 2022-04-15 10:43
1 | 1 | Frédéric Blanc | h1. Nextion |
---|---|---|---|
2 | |||
3 | h2. Lib |
||
4 | |||
5 | 3 | Frédéric Blanc | https://github.com/itead/ITEADLIB_Arduino_Nextion/archive/master.zip |
6 | |||
7 | https://randomnerdtutorials.com/nextion-display-with-arduino-getting-started/ |
||
8 | |||
9 | 4 | Frédéric Blanc | ajouter cette lib en plus (esp32 et esp8266) |
10 | https://github.com/plerup/espsoftwareserial/ |
||
11 | |||
12 | 5 | Frédéric Blanc | pour eviter l'erreur SPI.h: No such file or directory rajouter la ligne lib_ldf_mode = deep+ dans platformio.ini |
13 | |||
14 | 3 | Frédéric Blanc | platformio.ini |
15 | <pre><code> |
||
16 | [env:wemos_d1_mini32] |
||
17 | platform = espressif32 |
||
18 | board = wemos_d1_mini32 |
||
19 | framework = arduino |
||
20 | lib_ldf_mode = deep+ |
||
21 | upload_port = COM[4] |
||
22 | ; Serial Monitor options |
||
23 | monitor_speed = 115200 |
||
24 | </code></pre> |
||
25 | |||
26 | 1 | Frédéric Blanc | h2. Code |
27 | |||
28 | !clipboard-202201201522-uofla.png! |
||
29 | 2 | Frédéric Blanc | NexPage ( uint8_t pid, uint8_t cid, const char * name) |
30 | page CID is always zero! |
||
31 | |||
32 | 1 | Frédéric Blanc | <pre><code class="cpp"> |
33 | #include <Arduino.h> |
||
34 | #include "Nextion.h" |
||
35 | NexPage p0 = NexPage(0,0,"page0"); |
||
36 | NexPage p1 = NexPage(1,0,"page1"); |
||
37 | 2 | Frédéric Blanc | ... |
38 | p1.show(); |
||
39 | ... |
||
40 | 1 | Frédéric Blanc | </code></pre> |