Info Blurb screen added!

A "new fashioned" televisor, using an Arduino to drive the motor and display.

Moderators: Dave Moll, Andrew Davie, Steve Anderson

Info Blurb screen added!

Postby Andrew Davie » Mon May 15, 2017 1:59 am


youtu.be/-7ViZDGRc9c

I've added an information/details screen on a per-video basis. This is a page where I can put any text I like (that fits into 10 lines of 26 characters). The top line is reserved for a title, and the lowest line for a small copyright notice. In the demonstration in the video I try to give a general idea of what this might be like. The point is, I would like to use copyrighted material in my televisor and I hope that this will be approved if I include appropriate copyright notices.

The blurb is read from the SD card from a file with the same name as the video being played, but with ".TXT" extension. If it's not there, then there is no blurb available. I've just done a quick'n'dirty for the UI and re-used one of the arrow buttons. Soon this will be the most beautiful and astounding icon you've ever seen - something unexpected like an 'i' inside a circle. Or perhaps a question mark.

I've had many issues with crashes and glitches - pretty much random. It's coming down to the fact that memory is SO tight that even adding a variable inside a function/routine is causing issues with heap overflow, and so I just get random interactions elsewhere in the program. Very very unstable. I am using every trick I know of in order to save memory, and it's been a terribly slow process. Fortunately, I think I'm just about done now.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Info Blurb screen added!

Postby Andrew Davie » Mon May 15, 2017 11:35 am

With a single flash of inspiration I have solved many of my problems related to shortage of RAM. In a nutshell, whereas I treated objects on the Nextion as immutably 'tied' to variables in my program, I realised that in fact the variables could be transient and the Nextion objects (e.g., a line of text that I can change is an 'object') themselves would be permanent. So instead of allocating global variables at the start for all of the objects in the UI, now I just fire them up when I want to make a change, and kill them off when the change is done. It's a bit more processing for the Arduino, but my RAM usage has plummeted and I'm not seeing the random crashes that I was seeing before. RAM usage dropped from 80% to 63% which is pretty massive. Anything over 75% and the "strangeness" starts to happen.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Info Blurb screen added!

Postby Andrew Davie » Tue May 16, 2017 12:11 am

As noted earlier, I found a fantastic RAM saving - rather than have global/permanent variables talking to the Nextion (e.g., a "NexButton" for the stop button), I make these transient. It's the Nextion object that's permanent, but the Arduino objects talking to those nextion objects can come and go. So, no more Nextion globals and suddenly my RAM is now around 65% full (compared to 80%). Anything over 75% and the Arduino becomes unstable because of clashes between heap space and stack, etc. So this is a great outcome.

So saying, it looks like I can put back the "shifter" idea.

Meanwhile, I've revamped the control page and drawn a few buttons. It's looking quite nice, now, and feels much more stable. I run through their usage/visuals in this video.


youtu.be/EOvnTsDxXWk
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia


Return to Andrew Davie's Arduino Televisor

Who is online

Users browsing this forum: No registered users and 3 guests