What is so hard about taking a screenshot, or copying the output of a tree
listing?
Using an Arduino Mega 2560 as the selected board (as the Nextion config defaults require a Serial2 which the Uno doesn’t have, otherwise I would have used that in lieu of knowing what board you are compiling for) I was able to go to the ITEADLIB_Arduino_Nextion release page, download the zip, unzip it to the ‘\lib’ folder, and compile one of the examples. You can see the project layout here.
Now, note that the only tagged ‘release’ version is 0.7.0 (which is also the version that PIO is using) from 2015, but in the main repo it mentions 0.9.0, and there were changes in 2017. Because of changes to the library, the previously example program doesn’t work… First not finding SPI.h
, and then when adding the #include
for that to main.cpp
, SD.h
, and then finally SoftwareSerial.h
… and then it compiled.
Note: if you use a core that doesn’t supply the SD library (i.e. when you use atmega2560 as the board target, you’re using the MegaCore board support package, which includes the SD.h library, whereas the megaatmega2560 Arduino provided board support package doesn’t, and you need to add the library)…
So in the end, I have …
#include <Arduino.h>
#include <SPI.h>
#include <SD.h>
#include <SoftwareSerial.h>
#include "Nextion.h"
… at the top of my main.cpp
file, and the Nextion 0.9.0 from the github master branch compiled just fine … you can see that revision of the files here.
Or, if you want, you can see the setup with the megaatmega2560 board target, meaning I also need to supply the SD library as Arduino bundle it separately to the core, which also compiled just fine once the dependencies were satisfied.
Hopefully being able to see the three distinct versions will help it all make sense. At the end of the day, choice is yours… but be warned that the latest ‘release’ 0.7.0 of the Nextion library is different to the latest code in the master branch of the GitHub!