Start a new topic

'Nextion' does not name a type - compiler error

Hi erverybody!
I am building up a doorpi system with a nextion display as a door station. The Arduino should get the nextion's output and forwarding it to the raspberry.

I use the ITEAD Nextion lib 0.7.0 for communicating between Arduino and the Nextion display. But when I try to compile I get following error notification:

  1. PLATFORM: Atmel AVR > Arduino Pro or Pro Mini ATmega328 (5V, 16 MHz)
  2. HARDWARE: ATMEGA328P 16MHz 2KB RAM (30KB Flash)
  3. Library Dependency Finder -> http://bit.ly/configure-pio-ldf
  4. LDF MODES: FINDER(chain) COMPATIBILITY(soft)
  5. Collected 29 compatible libraries
  6. Scanning dependencies...
  7. Dependency Graph

  8. |-- <OneWire> 2.3.4
  9. |-- <Nextion> 0.7.0
  10. |-- <SD> 1.1.1
  11. | |-- <SPI> 1.0
  12. |-- <SoftwareSerial> 1.0
  13. |-- <SPI> 1.0
  14. Compiling .pioenvs\pro16MHzatmega328\src\main.cpp.o
  15. Compiling .pioenvs\pro16MHzatmega328\libbe1\ITEADLIB_Arduino_Nextion\NexHotspot.cpp.o
  16. Compiling .pioenvs\pro16MHzatmega328\libbe1\ITEADLIB_Arduino_Nextion\NexObject.cpp.o
  17. Compiling .pioenvs\pro16MHzatmega328\libbe1\ITEADLIB_Arduino_Nextion\NexPage.cpp.o
  18. src\main.cpp:16:1: error: 'Nextion' does not name a type
  19. Nextion myNextion(nextion, 9600);

Here is the code:
  1. #include <Arduino.h>
  2. #include <OneWire.h>
  3. #include <SPI.h>
  4. #include <SD.h>
  5. #include <SoftwareSerial.h>

  6. #include "Nextion.h"

  7. SoftwareSerial nextion(2, 3);

  8. Nextion myNextion(nextion, 9600);

It seems that there is a problem in the lib, but unfortunately the itead support was not able to help me.
Can someone tell me how to fix the problem, please?

Thanks in advance!
Alexander


1 person has this question

I believe I'm getting a similar compile error and could use help. Did anyone respond to you? The site looks like no one did. 


Here is my error. I'm just running any of the default examples from Nextions Arduino library. I've edited the NexConfig.h file to use just Serial. I'm stumped on why this isn't working now.


Nextion\Nextion.cpp:3:1: error: 'Nextion' does not name a type

 

 Nextion::Nextion(uint8_t rx, uint8_t tx)

Unfortunately I got no response yet.

Either I do something wrong or nobody else uses the library anymore...

Login or Signup to post a comment