VS Arduino
Visual Micro >> Other Hardware >> Nextion library, how to install in Visual Micro
https://www.visualmicro.com/forums/YaBB.pl?num=1609828883

Message started by LarryG on Jan 5th, 2021 at 6:41am

Title: Nextion library, how to install in Visual Micro
Post by LarryG on Jan 5th, 2021 at 6:41am
Has anyone documented how to integrate the Nextion library into VM?

Title: Re: Nextion library, how to install in Visual Micro
Post by Visual Micro on Jan 5th, 2021 at 5:20pm
Hi

Visual Micro is compatible with the Arduino Framework and supports same configuration as the Arduino IDE. Is this the library?

https://www.arduino.cc/reference/en/libraries/easy-nextion-library/


Title: Re: Nextion library, how to install in Visual Micro
Post by LarryG on Jan 5th, 2021 at 7:00pm
Thank you for the reply.

Yes, using the Arduino.cc library manager, I installed Easy Nextion Library ver. 1.0.5, then performed a refresh in the Visual Micro Explorer / Manage Libraries. 

(This may be moot.  See below)
I then tested by adding the Nextion NexButton() function statement to my code.  upon compilation, I received the error message,
ScintillatorMonitor.ino: 17:23: fatal error: NexButton.h: No such file or directory
   #include "NexButton.h"

I then found the library:  "ITEADLIB_Arduino_Nextion-0.7.0" which contains NexButton.h, etc, and added to the other libraries in:   C:\Program Files (x86)\Arduino\libraries

Now, NexButton.h is found and the Build is successful.
(However, I don't know if these functions will be needed)

I understand that The Easy Nextion Library contains the four (or five) basic functions for serial comm. as described here:
https://github.com/Seithan/EasyNextionLibrary

However, as per the example code I added:

#include "EasyNextionLibrary.h"  // Include EasyNextionLibrary

And I added the class:  EasyNex myNex(Serial);

so now, statements like:
myNex.writeNum("b0.bco", 2016);

compiles OK.

I have not yet written actual code to communicate with the Nextion display via. the DUE's serial lines.  I will now attempt to do so.

Now, I should be able to use these 4 or 5 basic serial comm. functions. 

The functions in the: ITEADLIB_Arduino_Nextion-0.7.0

like:  NexButton()  may not be needed.

Please excuse the apparent confusion.











Title: Re: Nextion library, how to install in Visual Micro
Post by Visual Micro on Jan 5th, 2021 at 7:55pm
Thanks but please do follow the guide in yellow above when posting to the forum. It shows us your config, which libs you have installed and what options you have switched on or off.

Other tips: suggest use chevrons when referencing files that not in the project <> instead of double quotes "".

#include <myLib.h>

#include "src/local-stuff/mycode.h"

The libraries also often come with examples that should work without change. If a library depends on another library that should be reported in the deep search unless you have switched it off.

Title: Re: Nextion library, how to install in Visual Micro
Post by LarryG on Jan 6th, 2021 at 2:01am
OK, Thank you on instructions.

Yes, I do use <> chevrons for include files but I pasted in an example from a tutorial which used quotes, which did take my attention. 

Making progress...

Title: Re: Nextion library, how to install in Visual Micro
Post by Visual Micro on Jan 6th, 2021 at 2:22am
Great, thanks for the update.

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.