Go Down

Topic: Expert to tidy Arduino Nextion code (Read 588 times) previous topic - next topic

andyturner

Hi

I have completed a sketch to control a putting platform using Arduino but interfaced with a Nextion touch screen, I am looking for someone to review my code and hopefully put it into the most efficient format. As the sketch is large I will attach it below.

Many Thanks
Andy

zwieblum


andyturner

Hi

As the code works ok I was thinking up to £200 to make it more efficient.

Thanks
Andy

zwieblum

More efficient in what respect? Speed? Size?

andyturner

Im just learning at the moment, I know the nextion code is as it should be but was wondering if there is a way to reduce the rest and make it more effiecent?

zwieblum

There is not much rest if you ignore the Nextion code :) Again, what would you like to optimize it for?

wvmarle

LOTS of repetition in the code. Many variables with numbers - that's calling for arrays and for loops. Code can definitely made MUCH shorter.

Budget sounds quite reasonable but without the actual hardware I'm not going to burn my hands on this. Optimising is bound to introduce new bugs - without the actual hardware it's hard to figure out what it's supposed to do and whether behaviour is not changed by these optimisations.

Why do you even want to mess around with the code? I may assume it works now?
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up