BRLAB DOCS
HomeTutorialsHardware
Control Relays with the Nextion HMI and Arduino
Control Relays with the Nextion HMI and Arduino
  • Introduction
  • GETTING STARTED
    • What You Will Need
    • Wiring
  • HMI GUI
    • Nextion HMI Setup
    • GUI Design
    • HMI Code
    • Load Code on the HMI
  • NANO EVERY CODE
    • Task to Complete
    • Writing the Code
      • Comment Header
      • Define Global Variables
      • void setup()
      • void loop()
      • void serial_input()
    • Application Code
    • Files
Powered by GitBook
On this page
  1. HMI GUI

Load Code on the HMI

To do this I am going to use an SD card to flash the HMI code.

Go to File->TFT File Output, select where you want to output the file to and click the ouput button. Open up the folder that the TFT file was put and copy this file onto your SD card. Make sure that it is the only file that is on the SD card.

Put the sd card into the microSD card slot on the HMI and turn on power. It will start flashing the HMI. Once it is done flashing remoce the microSD card and cycle the power. The switches should appear on your screen.

Now that we have the HMI code done and flashed lets jump over to the Arduino IDE and write some code to actually switch the relays on and off.

PreviousHMI CodeNextTask to Complete

Last updated 2 years ago