Based on DIY Statusdisplay from KNXUF
See folder v1.3 for original content
See List on KNXUF. Unfortunately EXP-Tech is no longer selling to end users, so you need to use a shop like Ali-Express for the display.
Download latest version from here
- Download source zip from Github
- If using Arduino IDE:
- Create folder
%USERPROFILE%\Documents\Arduino\libraries\KnxTpUart
- Copy content of folder
src/
into folder%USERPROFILE%\Documents\Arduino\libraries\KnxTpUart
- Create folder
- Nextion Editor to create the display layout
- Nextion sources to interact with the display. Download latest release from Github (currently 0.7.0)
- If using Arduino IDE:
- Extract downloaded archive into folder
%USERPROFILE%\Documents\Arduino\libraries\
- Extract downloaded archive into folder
To create the images/backgrounds etc. for the display something like Inkscape.
To enable interaction with the Nextion display in both ways, NexConfig.h
needs to be tweaked:
- Open
%USERPROFILE%\Documents\Arduino\libraries\ITEADLIB_Arduino_Nextion-0.7.0\NexConfig.h
with editor of your choice - Find the following snippet:
/** * Define nexSerial for communicate with Nextion touch panel. */ #define nexSerial Serial2
- Comment the
#define...
statement and add three additional lines like this:(Credits to https://www.hackster.io/tsavascii/nextion-lcd-communicate-with-arduino-uno-188a44)/** * Define nexSerial for communicate with Nextion touch panel. */ //#define nexSerial Serial2 #include <SoftwareSerial.h> extern SoftwareSerial HMISerial; #define nexSerial HMISerial
- Create background images with a tool of your choice
- Create the display content using Nextion HMI editor. As an example see Nextion/DisplaySmall.HMI
- Flash the created *.tft file onto the display
- Open Status-Display-Sketch/Status-Display-Sketch.ino with Arduino IDE and modify to your needs. Especially the lines with the definitions of your KNX group addresses and the line with the physical address of the display.
- Compile and upload to the Arduino Micro
The example on this repository is for the display NX3224T024 with a resolution of 320x240px. It's using landscape mode and has four pages:
- Welcome page
- Please wait, it's ringing
- Error page regarding finger print reader
- Simple keypad page
- The first two pages have an invisible button top left, with which you can jump to the next page
- The third page opens page four on "Yes" and goes back to page one on "No"
- The fourth page (keypad) just sends the component ID of each button
- The sketch on Status-Display-Sketch/Status-Display-Sketch.ino defines three group addresses to interact:
knxGA01
should be DPT5 and is used to send the number of the page, which should be displayed. Number starts at1
for the 1st page,2
for the 2nd a.s.o.- Sending
0
toknxGA01
, the display will be turned off.
- Physical address defined on line 25
- 12 Buttons, which send their "value" back to KNX
- Number buttons 0-9 as Integer (1ByteInt, DPT5) to
knxGA02
- Boolean (1Bit, DPT1) to
knxGA03
true
for OKfalse
for Cancel
- Number buttons 0-9 as Integer (1ByteInt, DPT5) to