PDA

View Full Version : Nextion LCDs... How to comunicate ???



WMakoto
- 24th November 2017, 18:30
Hello everyone. How to communicate with Nextion Lcds using PBP ??? Link: https://www.itead.cc/wiki/Nextion_HMI_Solution

Ioannis
- 25th November 2017, 12:02
You control the LCD through TTL RS232 (only Tx and Rx needed).

Also you must ensure good +5V/1A to the LCD.

The rest on the users manual.
Ioannis

WMakoto
- 25th November 2017, 22:49
Hello Ioannis, thank you for the feedback.
I did not find examples for PBP on the internet. In the manual there are only examples for uses with Arduino and RaspBerry Pi.
I could not convert the command used in Arduino to be used in PBP.
My question is about the serial command format to use.

Thank you for any help.

Scampy
- 26th November 2017, 08:53
From what I can gather it uses a serial connection - so have a look at serial examples for PBP and then adapt them to send the instructions to the device. There is an example here http://support.iteadstudio.com/support/discussions/topics/11000012477 where someone is using an arduino without any library files, which may help

You should be able to used hserout command with a PIC that has a UART serial port (most do)

CuriousOne
- 17th January 2020, 19:17
I also ordered a module, waiting for delivery. Meanwhile, I've downloaded their IDE. Looks like Visual Studio, but so far, I have not managed, how to put my own text on label :D Very alogical design...

Ioannis
- 17th January 2020, 20:35
Mike's tutorial on Nuts n Volts is good starting point.

Also the tutorials on YouTube are very helpful. There are many that take you step by step.

Ioannis

mpgmike
- 18th January 2020, 01:15
Starting on Page 16:

http://nutsvolts.texterity.com/nutsvolts/201904/MobilePagedReplica.action?utm_source=hs_email&utm_medium=email&utm_content=80394112&_hsenc=p2ANqtz-_6vuwc4adOI7VWQNxEsRJsqSprYBehJfJ6tYFLPP5IH5UqqGSj Z7KLwFB2aGUdCOiPOWDr1cA4sVlYtU-JKcvV-LxN2w&_hsmi=80394112&pm=2&folio=16#pg16

It will be a 7 Part series, next issue: Communication between the Nextion and a PIC (using PBP3)

CuriousOne
- 19th January 2020, 05:00
Great. I've quit reading N&V a decade ago - too many ads and too many nonsense articles, hope they've changed that....

CuriousOne
- 31st January 2020, 06:26
Can't figure out, how to make textbox background transparent - when I set it to "image" it gives error during compile...

Ioannis
- 31st January 2020, 10:27
In the sta attribute select crop image

Ioannis

CuriousOne
- 31st January 2020, 11:28
Yes and it immediately gives an error after that.

Ioannis
- 31st January 2020, 11:45
There is a new version 0.59. Which version you have?

Ioannis

mpgmike
- 31st January 2020, 17:20
After you select "crop image" a new box will appear in Attributes called "picc". Click on it, click "browse", then select your background image.

CuriousOne
- 1st February 2020, 13:00
Yes, I got it working, but in a weird way.

Say I have some background picture, which I place on background layer.
Then I have textbox above it. Located at specified place.
I have to crop background picture in editor, in a such way, that it fits the area occupied by textbox.
Then use that cropped picture as textbox background.

There is simply no way to make text background "transparent".

Ioannis
- 1st February 2020, 14:29
I do not know why it is not working for you.

Please send to me your email and I will reply with the demo file that just work! You can go on and do your mods then.

Ioannis

mpgmike
- 2nd February 2020, 01:02
Since writing that first article I learned something new. Instead of placing a Picture the size of your screen, start with an empty screen. Choose "image" for sta. Then picc, browse, select your background image.

mark_s
- 12th February 2020, 17:18
Hi Mike,

Just received the latest Nuts & Volts with your Nextion article, good work. Wish I had this two years ago!

If you like writing articles, B4A is now free and programs much like the Nextion or VB. Probably a lot interest with hobbyist. I've made android apps to communicate with HC-05 Bluetooth modules connected to pic micros.

https://www.b4x.com/b4a.html

Ioannis
- 19th March 2021, 15:23
Mike, the latest issue of Nuts'n'Volts does not have your new article on Nextion displays as promised on article 5.

Was this on error?

Ioannis

mpgmike
- 20th March 2021, 00:10
They were taking so long to get to the next issue I thought I had plenty of time to get them done. Unfortunately, they decided to get on the ball (well, unfortunately for me) and start cranking out magazines. I got stuck with a cold NE winter and the inability to get the 6th article finished. Warmer weather is rapidly approaching, so I should be back on things to get the next one out (and the last 7th one shortly thereafter). My apologies.

Ioannis
- 20th March 2021, 23:21
No problem. I thought that you ended your cooperation with the magazine.

Wish you the best,
Ioannis

mpgmike
- 21st March 2021, 14:03
No, I submitted 2 other non-related articles not yet published. I fully expected one (at least) in the current issue; but alas, it wasn't to be.

retepsnikrep
- 28th June 2021, 20:12
Could someone please confirm exactly which issues these articles are in so I can buy them.

Thanks

mpgmike
- 28th June 2021, 22:55
2020, Issues 4, 5, & 6
2021, Issues 1 & 2

I still owe 2 more articles, but perhaps I'm anal in that I want them to be "as good as I can make them" before submitting, and I'm still working (diligently, I might add) on them.

Ioannis
- 29th June 2021, 08:44
The later IDE support animation and video. Maybe you can include these features also?

Ioannis

CuriousOne
- 29th June 2021, 21:18
LOL I can't make on screen button to change value on some pin, animations? too early :D

mpgmike
- 1st July 2021, 13:07
The later IDE support animation and video. Maybe you can include these features also?

Ioannis

The "Basic" series doesn't support these features. You must use the "Intelligent" stuff for that. If using higher end Nextion, you may not need the PIC.

Ioannis
- 1st July 2021, 13:48
Yes, I do have a 10" one to test it. The demo that is loaded is very interesting but they do not have it on-line. Unfortunately I have not figured how one can do such a programming on these LCD's.


https://youtu.be/J5R_50VPzNE


https://youtu.be/ixx_TSAcqbY

These videos are from the demo 10" capacitive LCD.

Ioannis

retepsnikrep
- 1st July 2021, 14:44
Hi mpgmike.

Do you have any comments about adapting your example code from the magazine article for a PIC18LF26K80 at 64mhz?

Not sure if I was allowed to post it here? But it is downloadable from the N&V site.

Thanks Peter

mpgmike
- 1st July 2021, 15:02
The article used a PIC16F18426, because that's what I needed for the Small Engine Ignition Timing Controller. Using a PIC18F would require different CONFIGs and probably different SFR bits, but should work otherwise just talking to the Nextion. The K80 doesn't have enough Timers to do the full Timing Controller project.

As for those videos, just upload 4 or 8 frames of the moving picture. Use the Timer feature (tm0) with a Variable (va0) to track sequence and the vis command to show each picture in sequence. Timer code should look like this


if(va0.val==1)
{
vis p0,1
vis p1,0
vis p2,0
vis p3,0
}else if(va0.val==2)
{
vis p0,0
vis p1,1
vis p2,0
vis p3,0
}else if(va0.val==3)
.....
}
va0.val+=1
if(va0.val==5)
{
va0.val=1
}

Ioannis
- 4th July 2021, 09:08
Great! Thanks Mike.

Ioannis