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

Login or Signup to post a comment