Coder Social home page Coder Social logo

esp32-nextion-now's Introduction

Nextion ESP-NOW interface

ESP-NOW interface to Nextion Serial Displays.

  • Listens for JSON-formatted data on ESP-NOW and forwards to Nextion serial port.
  • Listens on Nextion serial port and forwards messages to ESP-NOW as JSON-formatted data

Uses:

  • ArduinoJson

ESP_NOW message format:

JSON Message sent to Nextion via ESP-NOW:

  • {"D": "ESP DEVICE NAME", "CMD": "Nextion Command"}

Example: To send the nextion command "page0.Ah1.val=123" to the Nextion (update Nextion object Ah1 on page0 to the value 123):

  • {"D": "ESP-Display", "CMD": "page0.Ah1.val=123"}

JSON Message from Nextion sent via ESP-NOW:

  • {"D":"ESP-DEVICE-NAME","MSG":"Hex message converted to ASCII representation"}\r\n

Exmple: Message from Nextion '66 00' (Nextion 'sendme' response)

  • {"D":"ESP-Test","MSG":"66 00 FF FF FF "}\r\n'

Note that Nextion responses are formatted and sent as ASCII representation of the hexadecimal emitted by Nextion

The companion app to this: https://github.com/mkjanke/ESP32-Now-JSON-GW. This gateway app receives ESP-NOW broadcasts and forwards them to an attached serial port.

Key components:

  • ESP_NOW callback:

    • Receive data from ESP Now, send to serial queue:
      • Incoming ESP-NOW packet --> onDataRecv --> send_to_Serial_queue
  • Task writeToNextion:

    • Dequeue data from serial queue, send to serial port:
    • send_to_Serial_queue --> writeToNextion --> Nextion Serial Port
  • Task handleNextion:

    • Recieve data from Nextion serial port, send to ESP-NOW queue:
    • handleNextion --> espNowSend() --> send_to_EspNow_queue
  • Task writeToEspNow:

    • Dequeue data from ESP-NOW queue, forward to ESP-NOW:
      • send_to_EspNow_Queue --> writeToEspNow() --> Outgoing ESP-NOW packet
  • Task espnowHeartbeat:

    • Send uptime and stack data to send_to_EspNow_Queue
    • Send uptime and stack data to Nextion serial port

esp32-nextion-now's People

Contributors

mkjanke avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.