4/21/2024 0 Comments Arduino mega pinout pdf![]() bco value, type 65504, press return Step 11Īdd Timer Component tm0 (size 80×30) Position 142,82Ī) click attribute. objname value, type t2, press returnĬ) click attribute. txt value, type Normal, press returnī) click attribute. txt value, type Read:, press return Step 10Īdd Text Component t2 (size 80×30) Position 142,82Ī) click attribute. txt value, type, press returnī) check Send Component ID checkbox in Touch Release Event Step 9Īdd Text Component t0 (size 60×30) Position 0,82Ī) click attribute. The Selected ZI Font is now added as Font Resource 0 Step 8Īdd Button Component b0 (size 30×100) position 0,0Ī) click attribute. This will now match our MCU side baudrate of 115200 from step 3c Step 7ī) select your 8×16 ZI Font file (*.zi) and click Open In the Event Pane, Preinitialize Event add bauds=115200 pic value and select resource 0 and press return sta value dropdown to image and press returnī) double click the attribute. ![]() Set the Page page0 background to Picture Resource 0Ī) set the page0 attribute. The selected picture is now added as Picture Resource 0 Step 6 Nextion Editor opens ready for the Project to be made Step 5Īdding our Picture Resource for backgroundī) Select your 240×400 picture file and click Open Next the Settings Dialog opens to the Device TABĮ) Select NX4024T032_011 Model and click OK – 1 background 240×400, add as Picture resource #0 We have chosen 115200 baud in our requirements, so locate the lines dbSerial.begin(9600) Īnd change these to our 250000/115200 baud dbSerial.begin(250000) Ĭreating the HMI for the Basic 3.2″ Nexiton NX4024T032_011 We will use the Serial Monitor and set its baudrate high (no need to waste more MCU time than is needed), then we will also need to configure for Nextion. Locate the nexInit() function, here we configure the baudrate for Serial Monitor and Nextion. Then locate the line defining nexSerial #define nexSerial Serial2 Locate the line #define DEBUG_SERIAL_ENABLE Iteadlib comes preconfigured for the Mega 2560 – nexSerial to use our hardware serial Serial2 Select and Open the Library zip file from step 1c.īe sure to READ the library readme.md file for directions Step 3Ĭonfigure the Nextion Library for use with the Mega 2560.Īs the Mega 2560 has 4 serials we will configure for ![]() ![]() Install the Iteadlib Arduino Nextion Library – 4 straight pins from Male/Male 2.54mm headerĭownload the Iteadlib Arduino Nextion LibraryĪ) goto Iteadlib Arduino Nextion Library github pageī) click Clone or Download and select Download ZIPĬ) Save to a location you’ll remember on your hard drive (for Next step) Step 2 – included Nextion 4 wire Power/UART cable – Nextion timer to evaluate and update status based on value – MCU to toggle LED on D13 on Button press/release – MCU to change pages in response to Button release This basic project will meet the following requirements In this post, I will show how to setup an Mega 2560 for use with Iteadlib with a basic Nextion HMI. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |