Jump to content

Component: Nextion Display (Graphical Color)

From Flowcode Help
Revision as of 14:36, 13 July 2026 by SteveT (talk | contribs) (Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Author Matrix TSL
Version 1.0
Category Graphical Color


Nextion Display component

A simple libray to interface a Nextion display. The elements on the nextion display are built using the Nextion Editor software and uploaded to the display. The component can then interact with the display elements.

Detailed description

No detailed description exists yet for this component

Examples

Handling Buttons

This example looks for button presses with IDs 1 and 2. On a button release event the corresponding LEDs will be toggled.

Nextion Touch Demo






Macro reference

GetText

GetText
Gets the text of a specific item 
- STRING Name
 
- STRING Return


GetTouchEvent

GetTouchEvent
Collects the next touch event in the queue. Returns 0 for no touch event detected, 1= touch press, 2 = touch release 
- BYTE Return


GetTouchID

GetTouchID
Gets the ID of the corresponding touch event. Must be called after calling GetTouchEvent component macro. 
- UINT Return


GetValue

GetValue
Gets the value from a specific item 
- STRING Name
 
- ULONG Return


Initialise

Initialise
Sets up the UART connection to the Nextion display 
- VOID Return


SetBackgroundColour

SetBackgroundColour
Sets the background colour of a specific item 
- STRING Name
 
- ULONG Colour
 
- VOID Return


SetFontColour

SetFontColour
Sets the foreground font colour of a specific item 
- STRING Name
 
- ULONG Colour
 
- VOID Return


SetPage

SetPage
Sets the page of the display allowing multiple configurations 
- STRING Name
Name of the page e.g. "page0" 
- VOID Return


SetText

SetText
Sets the text of a specific item 
- STRING Name
 
- STRING Text
 
- VOID Return


SetValue

SetValue
Sets the numeric value of a specific item 
- STRING Name
 
- ULONG Number
 
- VOID Return


Property reference

Properties
Communications
Channel
UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
Baud Options
Baud rate option selector 
Baud Rate
 
TX
Pin to be used for Transmit data 
RX
Pin to be used for Receive data 
Touch Queue Size
Number of touch press/release events we can store before running out of memory. 
Receive Buffer Size
Sets the number of byte elements inside the circular buffer. 
Timeout
Time in milliseconds to wait for a reply to a command. 
Simulation
Scope Traces
Selects if the scope traces are automatically added to the data recorder window or not. Simulation - draws an approximation of the UART data onto the scope trace. ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD. 
Console Data
Selects if the console data is automatically generated or not 
Data Source
Simulation data source used to allow the component to connect to various remote devices Nothing - Simulation data is ignored COM port - Routes the communication data to and from a physical or virtual COM port API - Routes the communication data via a data injector component on the Panel. 

Component Source Code

Please click here to download the component source project: FC_Comp_Source_API_Display_Nextion.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_API_Display_Nextion.fcfx