Comments (8)
You shouldn't add libraries under your Arduino install folder. Instead try putting the files under My Documents\Arduino\libraries\Nextion
This folder should contain all the Nex_._ files and should have the same name as the main library include file (Nextion.h)
from iteadlib_arduino_nextion.
From this tuturial: https://randomnerdtutorials.com/nextion-display-with-arduino-getting-started/
This library is configured for Arduino MEGA2560 by default. To make it work for Arduino Uno, you need to do the following:
1. Open the ITEADLIB_Arduino_Nextion folder
2. There should be a NexConfig.h file – open that file.
3. Comment line 27, so that it stays as follows:
//#define DEBUG_SERIAL_ENABLE
4. Comment line 32:
//#define dbSerial Serial
5. Change line 37, so that you have the following:
#define nexSerial Serial
6. Save the NexConfig.h file.
from iteadlib_arduino_nextion.
I am having a similar problem. I have my "netxtion" folder in my library folder. (i.e. where the rest of the libraries are). I really like this ease of use with this implementation and would like to use it. My project is quite simple using 2 temperature probes, recipes and a servo motor to control a damper.
I am getting the following errors and wanted to know what in the H I am doing wrong. I simply want to get this to compile. I only tried to compile the CompPage.ino file.
/home/arnold/Arduino/libraries/Nextion/NexHardware.cpp:18:25: error: conflicting declaration ‘SoftwareSerial Serial2’
SoftwareSerial nexSerial(10, 11); // RX, TX
^
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/Arduino.h:193:0,
from /home/arnold/Arduino/libraries/Nextion/NexHardware.h:17,
from /home/arnold/Arduino/libraries/Nextion/NexHardware.cpp:15:
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:107:25: error: ‘Serial2’ has a previous declaration as ‘HardwareSerial Serial2’
extern HardwareSerial Serial2;
^
/home/arnold/Arduino/libraries/Nextion/NexHardware.cpp: In function ‘bool recvRetNumber(uint32_t*, uint32_t)’:
/home/arnold/Arduino/libraries/Nextion/NexHardware.cpp:70:31: warning: left shift count >= width of type [enabled by default]
*number = (temp[4] << 24) | (temp[3] << 16) | (temp[2] << 8) | (temp[1]);
^
/home/arnold/Arduino/libraries/Nextion/NexHardware.cpp:70:49: warning: left shift count >= width of type [enabled by default]
*number = (temp[4] << 24) | (temp[3] << 16) | (temp[2] << 8) | (temp[1]);
^
from iteadlib_arduino_nextion.
You are trying to use define SoftwareSerial 2 tmes.
looks like nexSerial have already called SoftwareSerial as HardwareSerial included in file NexSerial.
They are conflicting together trying doing this same.
To understand why is error, open file nextHardware.h and NextHardware.cpp and search for HardwareSerial and Serial2. If there is included that names, it means that You dont need use it again in mine file.
Or doing it arround, coment line where is Serial2 in that files HardwareSerial*
from iteadlib_arduino_nextion.
UNO-like Mainboards
If your board has only one hardware serial, such as UNO, you should disable dbSerial and redirect nexSerial to Serial(Refer to section:Serial configuration).
Open NexConfig.h and replace line 37 for this: #define nexSerial Serial
and comment line 32, disabling dbSerial.
Then, recompile your code.
from iteadlib_arduino_nextion.
That's weird to fix the library in order to make it work. I have different boards - Mega, UNO, etc.
This is definitely wrong workflow.
from iteadlib_arduino_nextion.
baugusto and JanitoRamos, thank you. After making corrections to Nexconfig.h the compilation ran without errors. Just a few minor warnings.
from iteadlib_arduino_nextion.
From this tuturial: https://randomnerdtutorials.com/nextion-display-with-arduino-getting-started/
This library is configured for Arduino MEGA2560 by default. To make it work for Arduino Uno, you need to do the following:
1. Open the ITEADLIB_Arduino_Nextion folder
2. There should be a NexConfig.h file – open that file.
3. Comment line 27, so that it stays as follows:
//#define DEBUG_SERIAL_ENABLE 4. Comment line 32:
//#define dbSerial Serial 5. Change line 37, so that you have the following:
#define nexSerial Serial 6. Save the NexConfig.h file.
THANK YOU SO MUCH!
from iteadlib_arduino_nextion.
Related Issues (20)
- How to send timer id to uart? HOT 1
- Examples are out of date HOT 2
- Nextion library contains compile errors HOT 2
- Problem regarding upload example
- Not really and Arduino issue HOT 1
- testNextionNumberBox
- set pco issues
- Examples to old HOT 3
- Arduino Giga Problem HOT 3
- FIXED unable to change picture
- Get_background_cropi_picc in NextButton.cpp
- Detecting non touch events, is it even possible?
- BUG in function setValue for number object HOT 1
- Library update for Arduino Nano 33 IoT and 33 BLE? HOT 5
- Library wastes too much memory
- Compatibility with Controllino HOT 1
- nextion setText dosent work fine in arduino esp32 HOT 1
- Nextion
- Read the current page nextion
- subtle recvRetNumber coding error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iteadlib_arduino_nextion.