Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

tools for Nextion display on Arduino M2560

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here
View previous topic :: View next topic  
Author Message
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 1004
Location: France

france.gif
PostPosted: Sun Dec 15, 2019 6:40 pm    Post subject: tools for Nextion display on Arduino M2560 Reply with quote

Hi all
I am happy because I have long been searching to develop a program that works well. I think I understood the "Chinese?" spirit of the designers of the Human Machine Interface Nextion display
We cannot (as is the case with System 4D) do everything with it.
But to manage a small or large industrial or laboratory project, Nextion is SIMPLE to implement.
I would like to thanks EDC for providing me with a program that was not working! but that allowed me to finalize mine: Waitkey doesn't work well with nextion, we have to use inkey.
You will find here:
-a pps file that shows how to implement the nextion IDE
-the Hmi file
-fonts of characters
-the images used

-two excel files:
1) references
2) the responses returned by the screen in relation to an order

-a Bascom program.prj and its files.bas and.inc : example divided into 4 pages
where we find the main tools. for example to write a text we use the sub nex_txt() etc... built like H.Kipnik (thanks to him)
Each sub, macro or function is explained simply with few program lines.
You don't need video but you can see
https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=13923&highlight=nextion
it's similar
Now you can debug your program with the help of the instruction "debug on" so simple with Arduino thanks to Mark ! Wink

I'm waiting for your comments
JP Wink

_________________
pleasure to learn, to teach, to create
Back to top
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5278
Location: Holland

blank.gif
PostPosted: Mon Dec 16, 2019 10:20 am    Post subject: Reply with quote

hi JP,

thanks for this. I think all of this is good info to understand how to use the display. it seems all simple Very Happy
but it usually is when someone sorted it out. great to see the progress and cooperation.
So i can conclude that this is the way for at least the low cost standard solution?

_________________
Mark
Back to top
View user's profile Visit poster's website
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 1004
Location: France

france.gif
PostPosted: Mon Dec 16, 2019 10:55 am    Post subject: Reply with quote

You're right, Mark.
for Bascom users who don't want to get ahead of themselves, Nextion is for a reasonable price, the right solution that works.
it's not perfect but it's better and very fast.
and I make myself available to users to help them if necessary.

Wink
jp

_________________
pleasure to learn, to teach, to create
Back to top
View user's profile Visit poster's website
Kasch

Bascom Member



Joined: 18 Jun 2005
Posts: 47

PostPosted: Fri Sep 18, 2020 11:24 am    Post subject: Reply with quote

sorry for the stupid question: i downloaded the zip-file from Duval JP. I compiled the example but i got an errormessage: missing file declaration_nextion.inc and page_button.inc...what i do wrong? Thank you
Back to top
View user's profile
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1213
Location: SYDNEY

australia.gif
PostPosted: Fri Sep 18, 2020 1:50 pm    Post subject: Reply with quote

Hello Kasch
If you look in the blog section you will find https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=14531
I show my learning how to use the display
Note its not like all the other graphical displays you just need to send the values for the objects you create.
You will also see that it is able to do a lot of the work that the AVR would normally have to do.
Regards Paul
Back to top
View user's profile
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 1004
Location: France

france.gif
PostPosted: Fri Sep 18, 2020 2:40 pm    Post subject: Reply with quote

oops

I add the 2 files missing Embarassed

_________________
pleasure to learn, to teach, to create
Back to top
View user's profile Visit poster's website
Kasch

Bascom Member



Joined: 18 Jun 2005
Posts: 47

PostPosted: Sat Sep 19, 2020 2:25 pm    Post subject: Reply with quote

thank you Very Happy Very Happy
Back to top
View user's profile
sq2eer

Bascom Member



Joined: 16 Aug 2011
Posts: 4
Location: Pelplin

poland.gif
PostPosted: Thu Dec 10, 2020 10:14 pm    Post subject: Reply with quote

Hello - Duval JP i'm trying to compile your ArduinoMega2560 program but I get errors whether there are errors in macros to the nextion display my bacsom is



Compiler version :2.0.8.3
Compiler build :2.0.8.3.005
IDE version :2.0.8.3.003
Serial number :XX-XXXX-XXXXX
Windows OS :Windows 7 Ultimate
Company :
Owner :Jacek
Windows dir :C:\Windows
App data dir :C:\Users\Jacek\AppData\Roaming\MCS Electronics
System dir :C:\Windows\system32

Regards Jacek.

Sorry, I forgot to put in pictures yesterday.

I am using the simulator in Nextion Editor
The program for lcd is ok
errors pop up when trying to compile in Bascom.


Last edited by sq2eer on Fri Dec 11, 2020 7:21 pm; edited 3 times in total
Back to top
View user's profile
Evert :-)

Bascom Expert



Joined: 18 Feb 2005
Posts: 2132

netherlands.gif
PostPosted: Thu Dec 10, 2020 10:46 pm    Post subject: Reply with quote

Program compiles fine here.
Maybe you can share the error code because my glass sphere is broken.

_________________
www.evertdekker.com Bascom code vault
Back to top
View user's profile Visit poster's website
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 1004
Location: France

france.gif
PostPosted: Fri Dec 11, 2020 10:48 am    Post subject: Reply with quote

- what kind of error(s) ?
-what is your display ?
I'm as Evert i'm not a wizard
Rolling Eyes Wink

_________________
pleasure to learn, to teach, to create
Back to top
View user's profile Visit poster's website
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1213
Location: SYDNEY

australia.gif
PostPosted: Fri Dec 11, 2020 11:24 pm    Post subject: Reply with quote

From the code displayed it appears your trying to draw circles and boxes on the nextion
there is no need for this on the nextion as you simply use paint or similar program
to make a picture and load it into the nextion.
Regards Paul
Back to top
View user's profile
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 1004
Location: France

france.gif
PostPosted: Sat Dec 12, 2020 12:06 pm    Post subject: Reply with quote

well,
I checked my program, reinstalled an M2560, a screen NX4832K035 _11
as I had done for the demonstration program
and it all worked out : see the video

https://www.youtube.com/watch?v=TPp51D1DeI8

check your wiring,your display ?

I did the sub_macro_nextion#2.inc file as H.kipnik did for the ssd1963 display , trying to use the same statment

I found that some screens reacted slower than others.
use "debug on" to understand and fine-tune your application
I use the small Yes-another-Terminal to see the responses.

and please do it step by step, using the remarks '( ') or ' to progress.

https://sourceforge.net/projects/y-a-terminal/

-----------------------
Yes Paul You right but Nextion give you the possibility to do , it is a nice tool to draw too.
Now I use "intelligent" they are very very fast !
JP
Wink

_________________
pleasure to learn, to teach, to create
Back to top
View user's profile Visit poster's website
Pikczu

Bascom Member



Joined: 22 Jan 2006
Posts: 67
Location: Dublin, Ireland

ireland.gif
PostPosted: Mon Dec 14, 2020 9:43 pm    Post subject: Reply with quote

@ Jack SQ2EER
Add the space between print and hash(#).

Regards
Pikczu
EI9HEB
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum