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. NANO EVERY CODE

Task to Complete

So what does the code need to be able to do?

  1. Look to see if there is any data coming in on the serial buffer.

  2. Read the data from the serial buffer.

  3. Determine what the messages says.

  4. Perform and action or function based on the command from the message.

    1. Turn the commanded relay on our off.

The following sections will work through each step.

PreviousLoad Code on the HMINextWriting the Code

Last updated 2 years ago