Nextion
Extends:
EventEmitter → Nextion
High-level abstraction for interacting with a Nextion device.
Constructor Summary
Public Constructor | ||
public |
constructor(uart: UART, opts: Object | Function, connectListener: Function) Begins listening for data via a UART instance. |
Method Summary
Public Methods | ||
public |
Closes connection to Nextion device. |
|
public |
setComponentValue(name: string, value: *): Promise<ResponseResult> Sets a the value of a local component |
|
public |
setValue(name: string, value: *): Promise<ResponseResult> Sets a local or global variable on the current page to a value |
Public Constructors
Public Methods
public setComponentValue(name: string, value: *): Promise<ResponseResult> source
Sets a the value of a local component
Params:
Name | Type | Attribute | Description |
name | string | Name of component |
|
value | * |
|
New component value |
public setValue(name: string, value: *): Promise<ResponseResult> source
Sets a local or global variable on the current page to a value
Params:
Name | Type | Attribute | Description |
name | string | Name of variable |
|
value | * |
|
New variable value |