Re: Adding a Nextion Display to the F40 (uBitx adjacent) #arduino #nextion

Dean Souleles

Hi Jack,

I like your video - it gives me some good ideas for UI improvements.  I also plan to implement a spectrum display.   And for that reason and others its clear I need to move off of the Nano and start using a Teensy.  I like using object oriented libraries like the one provided by Nextion - once you get over the initial learning curve, they make implementing the UI a snap.  The downside is they take up memory which is a precious commodity on a Nano  that I watch like a hawk every time I do a build.  It reminds me of my imbedded systems days where every module got a RAM budget and a timing budget.   Just including Nextion.h use over 1/2 of the Nano's available memory and each object (button, text, graph) that you need to manipulate from the sketch consumes 20-30 bytes or RAM.   I'm sitting at about 80% of Nano's variable memory which is about the limit where things begin to fail due to stack or heap problems. I've gone through and optimized globals, moves strings to flash and so on, but I've about reach the limit.  That is only an issue because the Nano has only 2K of SRAM.  For those of us who have become accustomed to fast processors and GBs of RAM that is quite daunting.  Even with that limitation it is remarkable what you can do with a $3 MCU - as Farhan and the guys have repeatedly demonstrated.  That said I have very little motivation to roll my own UI libraries or write my own protocol handler to try to shoehorn everything in to 2K.  That is a losing proposition and  I'd much rather work on the application.  To me the difference between a $3 MCU and a $20 MCU is not enough justify the hours of programming grief!  

Its funny what bothers us.  I have the 2.8" Nextion in the my uBiitx V5 in and Amateurradiokits case and I haven't noticed the sliding issue or haven't thought about it.  It is entirely possible that I am compensating by using two hands without even knowing it.  I'll check it out when I get home,  I haven't permanently mounted the Nextion in the homebrew rig yet so I don't know how that will work..


Join to automatically receive all group messages.