Go Down

Topic: Using Nextion displays with Arduino (Read 5345 times) previous topic - next topic

orion555

Got a bit 'side tracked' in the endless world of coding... especially as a newbie, sometimes it can be quite humbling and overwhelming looking at all those doors opening up in front of one's continuously growing eyes...

In a severe fit of megalomania I tried to write, well, re-write the NexNumber lib to a NexFloat and ended up in a very deep rabbit hole. took me a while to find my way out again, but got it from an endless list of errors down to a couple... and slowly a slightly broader spectrum of to this never ending subject.

But it 's definitely my turn to pass the flowers to you, Perry, for the help you are providing here. Nice little hints you are passing on, especially the last ones I found quite interesting, since it sort of unlocked a whole lot of new possibilities and you deserve every bit of Karma you can get for things like that...

Was using the Nex's own libraries and was a bit too lacy to re-write all the work I finished so fart, with your sample code in your first postings (nicely done, by the way). But I came to the conclusion, well better rephrase that, I was lucky enough to get my fit under control... ;), and now I'm humbly going to use your code and hope I can get back to you, in case I don't get it straight...but all in all work is progressing, even if it isn't 'quite' as fast as I first thought it might happen...but I find if always very satisfying if things slowly start to do the things they should.

Knowing now that I'm at least capable of asking reasonable intelligent questions, I'm glad I found somebody who is helpful  enough to answer them. Thanks a lot for that. Hope I won't have to bother you too much.

I presume that other people on the 'big search' are passing by here as well, so I thought I might pass on a little helper to the Serial.print subject, simple enough that even I could have thought of it... :D, well, I didn't...but going to pass it on anyway, since it safes time and memory...

Code: [Select]


void nexDataSend() {
  Serial2.write(0xff);       // We always have to send this three lines after each command sent to the nextion display.
  Serial2.write(0xff);       //use the Serial(x) you are communicating with your Nex
  Serial2.write(0xff);
}



...and I find it quite handy, maybe it helps someone else as well.

will try my best to surface once in a while and pop by... ;)

kind regards

PerryBebbington

Thank you Orion, that makes helping you and others worthwhile :)

PerryBebbington

I have added to part 4 'Nextion additional features', which brings several different things together in one place. Enjoy!

Go Up