Uploading a graphics file to the Nextion LCD display

After you have connected the Nextion LCD to your controller board for the first time, you need to upload the graphics onto the memory of the LCD. First step is to download a fresh copy of MK4Duo. Extract the file and open the firmware in Arduino.

Find the tab Configuration_Feature.h and look for the line "// Nextion 4.3" - 5" Enanched - 7" Enanched HMI panel". This section contains settings for the Nextion LCD. Uncomment the line #define NEXTION and set #define NEXTION_SERIAL to 3 for Megatronics. The section should now look like this:

/*****************************************************************************************
 ****************************** LCD / Controller Selection *******************************
 ******************************      Other Controllers     *******************************
 *****************************************************************************************/
//
// Nextion 4.3" - 5" Enanched - 7" Enanched HMI panel
//
#define NEXTION
// Define Serial it use
#define NEXTION_SERIAL 3
// For GFX preview visualization enable NEXTION GFX
//#define NEXTION_GFX
// Define name firmware file for Nextion on SD
#define NEXTION_FIRMWARE_FILE "mk4duo.tft"

Next, find the line "#define SDSUPPORT" and uncomment it. Upload the firmware onto the board. If you open serial Monitor in Arduino, during startup the board should report that it found the Nextion LCD:

Info:Echo:MK4duo_4.3.6
Echo:Last Updated: Aug  2 2018 17:22:05 | Author: (none, default config)
Echo:Compiled: Aug  2 2018
Echo:Free Memory: 1498 PlannerBufferBytes: 1200
Nextion" connected!
SD card ok
Echo:Hardcoded Default Settings Loaded

In the firmware folder find the subfolder "/NextionFW". It contains .HMI and .tft files. The .tft files have the graphics information contained. Find the appropriate file for your LCD display. For example, if you have the 3.5" version of the display use mk4duo_3_5_basic.tft. Put it onto a MicroSD card and rename it to "mk4duo.tft".

Put the SD card into the controller board and open Serial monitor in Arduino, or any program that allows you to send Gcode commands to the Megatronics. Enter the gcode command M35, and the board should report it is starting the upload "Start checkFile mk4duo.tft". The Nextion LCD will turn white with red characters and display the upload progress.

 

The upload progress will take a while, after which the LCD will reset. Unplug power from the megatronics and plug in again, the LCD should initialize correctly and show a graph with temperatures.

Why ReprapWorld?
  • Orders dispatched same business day
  • 3.000+ products in our assortment
  • More than 45.000 satisfied customers in over 40 countries
  • Secure payment for all payment options
  • Professional tech support (over 10 years 3D experience)
Pay safely using


home
Copyright 2009 - 2023 | ReprapWorld