| 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
Downloadable macro reference
|
GetTouchID
|
| Gets the ID of the corresponding touch event. Must be called after calling GetTouchEvent component macro.
|
- UINT
|
Return
|
|
GetValue
|
| Gets the value from a specific item
|
- STRING
|
Name
|
|
|
- ULONG
|
Return
|
|
SetText
|
| Sets the text of a specific item
|
- STRING
|
Name
|
|
|
- STRING
|
Text
|
|
|
- VOID
|
Return
|
|
GetText
|
| Gets the text of a specific item
|
- STRING
|
Name
|
|
|
- STRING
|
Return
|
|
SetFontColour
|
| Sets the foreground font colour of a specific item
|
- STRING
|
Name
|
|
|
- ULONG
|
Colour
|
|
|
- VOID
|
Return
|
|
SetPage
|
| Sets the page of the display allowing multiple configurations
|
- STRING
|
Name
|
| Name of the page e.g. "page0"
|
- VOID
|
Return
|
|
SetValue
|
| Sets the numeric value of a specific item
|
- STRING
|
Name
|
|
|
- ULONG
|
Number
|
|
|
- VOID
|
Return
|
|
GetTouchEvent
|
| Collects the next touch event in the queue. Returns 0 for no touch event detected, 1= touch press, 2 = touch release
|
- BYTE
|
Return
|
|
SetBackgroundColour
|
| Sets the background colour of a specific item
|
- STRING
|
Name
|
|
|
- ULONG
|
Colour
|
|
|
- VOID
|
Return
|
|
Initialise
|
| Sets up the UART connection to the Nextion display
|
- VOID
|
Return
|
|
Start
|
| Startup routine required by the hardware device.
|
- VOID
|
Return
|
|
SetBackgroundColour
|
| Specifies the colour of the background by creating a mixture of red, green and blue.
|
- BYTE
|
PixelColour
|
| 0=White, 1=Black
|
- VOID
|
Return
|
|
DrawCircle
|
| Draws a circle object on the display with the center of the circle at the location X,Y
|
- UINT
|
X
|
| X Coordinate for the center of the circle
|
- UINT
|
Y
|
| Y coordinate for the center of the circle
|
- UINT
|
Radius
|
| Radius of the circle specified in pixels
|
- BYTE
|
Transparent
|
| 0=Fill inside circle using background colour / 1=Draw outer circle only
|
- BYTE
|
Solid
|
| 0=Use Transparent Setting / 1=Fill with foreground colour
|
- VOID
|
Return
|
|
SetForegroundColour
|
| Specifies the colour of the foreground by creating a mixture of red, green and blue.
|
- BYTE
|
PixelColour
|
| 0=White, 1=Black
|
- VOID
|
Return
|
|
DrawRectangle
|
| Draws a rectangle with the current foreground colour from pixel loaction X1, Y1 to pixel location X2, Y2
|
- UINT
|
X1
|
|
|
- UINT
|
Y1
|
|
|
- UINT
|
X2
|
|
|
- UINT
|
Y2
|
|
|
- BYTE
|
Transparent
|
| Chooses the transparency of the box - 0 = Box contains background colour, 1 = Box contains previous pixel data.
|
- BYTE
|
Solid
|
| Chooses to fill the box with colour - 0 = Box contains transparency data, 1 = Box contains foreground colour.
|
- VOID
|
Return
|
|
Initialise
|
| The Init macro must be called once to initialise the Graphical LCD display before any other Graphical LCD component macros are called.
|
- VOID
|
Return
|
|
InvertDisplay
|
|
|
- VOID
|
Return
|
Property reference
|
Properties
|
|
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.
|
|
Connections
|
|
Simulations
|
|
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.
|