AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Nextion lcd font wizard8/4/2023 ![]() Over 80% of my time coding the original WIoT was dedicated to writing code to manipulate graphic / button elements to send to the RA8875 TFT controller and LCD I had. It also requires many debug runs to ensure you have the placement correct. For example, to place some text you have to send separate commands to define which font to use, which size, it’s colour, and x/y placement. ![]() They require graphics and font processing code to be written in your MCU and pushed from the MCU to the screen when displaying content. What is your time worth? How complex is it to draw graphics to other TFT’s? Prior to the Nextion, I was using other TFTs that used SPI to communicate. However, you have to consider the total cost of ownership. There’s no question that the Nextion TFT’s are more expensive than other TFT’s out there. ![]() Easy peasy! My WIoT-2 project provides lots of info and as well as a sketch and HMI file. You compile the sketch and upload that to the MCU and you have a project! Then, connect +5V, GND and the TX/RX lines to your MCU and you’re done. You will see your screen with graphics and default values you created. Once complete, disconnect power, remove the card, then power it back up. This will load the tft file into the firmware of the Nextion. tft file to a Micro SD card, then load the card into the back of the Nextion, and power it up. In the HMI, you lay out your graphics, buttons and text, compile it, transfer the. change a page, force a button click etc etc). You can then develop your sketch which procesess sensor and other data and sends the commands over serial to update the values in the interface. Lay out all the graphics, text, buttons etc and assign them variable names. The general idea is you develop your interface (HMI) on the Nextion. You can see this in action with my WIoT-2. These MCUs become the brains to process input from sensors etc and simply need to send commands over serial to display results graphically. What I (and most others do) is connect it to an Arduino or EPS8266. You could, for example do an entire project solely on the Nextion screen (enhanced model) by connecting a temperature and other sensors directly and reading the results. You can even do some programming on the base device and more so on the enhanced version (which has GPIO pins). ![]() The Nextion approach consists of a TFT LCD that has brains and memory built in, and a Windows editor (HMI) to develop your graphical interface by placing images and text on a screen and designing how they will interact. They are also generally slow at drawing as they require the MCU (an ESP8266 in my case) to do the graphics processing work and send them pixel-by-pixel to the TFT. Instead, I went down a path building projects using SPI-based TFTs which require a lot of work to draw and manipulate graphics and text. I ignored it as there was not a lot of documentation, and frankly, I really didn’t understand the concept of graphics work done on the TFT, and the rest on the MCU. I stumbled upon the Nextion (which is a slick easy-to-use TFT LCD with a HMI editor) when they had their first crowdfunding campaign a year or so ago. I’ll start this by stating that I don’t work for iTead, and nor am I getting any sort of kickbacks… I just really like this TFT LCD. ![]()
0 Comments
Read More
Leave a Reply. |