Component: Nextion Display (Graphical Color)
Author | Matrix TSL |
Version | 1.0 (Release) |
Category | Graphical Color |
Contents
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.
Examples
No additional examples
Downloadable macro reference
GetTouchID
Gets the ID of the corresponding touch event.
Must be called after calling GetTouchEvent component macro.
Parameters
- This macro has no parameters
Return value
GetValue
Gets the value from a specific item
Parameters
- <- STRING Name
- This parameter may be returned back to the caller
Return value
SetText
Sets the text of a specific item
Parameters
- <- STRING Name
- This parameter may be returned back to the caller
- <- STRING Text
- This parameter may be returned back to the caller
Return value
- This call does not return a value
GetText
Gets the text of a specific item
Parameters
- <- STRING Name
- This parameter may be returned back to the caller
Return value
SetFontColour
Sets the foreground font colour of a specific item
Parameters
- <- STRING Name
- This parameter may be returned back to the caller
- ULONG Colour
Return value
- This call does not return a value
SetPage
Sets the page of the display allowing multiple configurations
Parameters
- <- STRING Name
- Name of the page e.g. "page0"
- This parameter may be returned back to the caller
Return value
- This call does not return a value
SetValue
Sets the numeric value of a specific item
Parameters
- <- STRING Name
- This parameter may be returned back to the caller
- ULONG Number
Return value
- This call does not return a value
GetTouchEvent
Collects the next touch event in the queue.
Returns 0 for no touch event detected, 1= touch press, 2 = touch release
Parameters
- This macro has no parameters
Return value
SetBackgroundColour
Sets the background colour of a specific item
Parameters
- <- STRING Name
- This parameter may be returned back to the caller
- ULONG Colour
Return value
- This call does not return a value
Initialise
Sets up the UART connection to the Nextion display
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Simulation macro reference
This component does not contain any simulation macros
Property reference
Channel
This property is of type Fixed list of ints and can be referenced with the variable name cal_uart1::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
This property is of type Fixed list of ints and can be referenced with the variable name cal_uart1::BAUD_LIST.
Baud rate option selector
Baud Rate
This property is of type Signed integer and can be referenced with the variable name cal_uart1::BAUD.
No additional information
TX
This property is of type Single digital pin and can be referenced with the variable name cal_uart1::TX.
Pin to be used for Transmit data
RX
This property is of type Single digital pin and can be referenced with the variable name cal_uart1::RX.
Pin to be used for Receive data
Touch Queue Size
This property is of type Unsigned integer and can be referenced with the variable name TouchQueueSize.
Number of touch press/release events we can store before running out of memory.
Receive Buffer Size
This property is of type Unsigned integer and can be referenced with the variable name CircularBuffer1::BufferSize.
Sets the number of byte elements inside the circular buffer.
Timeout
This property is of type Unsigned integer and can be referenced with the variable name Timeout.
Time in milliseconds to wait for a reply to a command.
Scope Traces
This property is of type True or false and can be referenced with the variable name cal_uart1::ScopeTraces.
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
This property is of type True or false and can be referenced with the variable name cal_uart1::ConsoleData.
Selects if the console data is automatically generated or not
Data Source
This property is of type Fixed list of ints and can be referenced with the variable name cal_uart1::DataSource.
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.