This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| et:arduino:display:project1 [2016/03/18 09:07] – tekitatud raivo.sell | et:arduino:display:project1 [2020/07/20 09:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Nextion ====== | + | ====== Nextion |
| + | {{: | ||
| + | \\ | ||
| + | \\ | ||
| + | Nextion is a Seamless Human Machine Interface (HMI) solution that provides a control and visualisation interface between a human and a process, machine, application or appliance. Nextion is mainly applied to IoT or consumer electronics field. It is the best solution to replace the traditional LCD and LED Nixie tube. | ||
| + | |||
| + | We notice that most engineers spend much time in application development but get unpleasant results. In this situation, Itead offers you an excellent solution. This solution includes the hardware part - a series of TFT LCDs and the software part - Nextion editor. Nextion TFT LCDs use only one serial port to do communicating, | ||
| + | |||
| + | |||
| + | =====Nextion example project on Arduino UNO==== | ||
| + | \\ | ||
| + | {{youtube> | ||
| + | \\ | ||
| + | ===Arduino UNO example code=== | ||
| + | Example code is not using arduino library for communication with Nextion LCD. | ||
| + | <code c> | ||
| + | int value, value2, getValue, oldvalue; | ||
| + | |||
| + | void setup() { | ||
| + | Serial.begin(9600); | ||
| + | } | ||
| + | |||
| + | void loop() { | ||
| + | getValue = analogRead(A0); | ||
| + | if (getValue==oldvalue) | ||
| + | { | ||
| + | //do nothing | ||
| + | } | ||
| + | else | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | else value2 = map(value, 172, 1023, 0,223); | ||
| + | |||
| + | Serial.print(" | ||
| + | Serial.print(value2); | ||
| + | Serial.write(0xff); | ||
| + | Serial.write(0xff); | ||
| + | Serial.write(0xff); | ||
| + | Serial.print(" | ||
| + | Serial.write(0x22); | ||
| + | Serial.print(value); | ||
| + | Serial.write(0x22); | ||
| + | Serial.write(0xff); | ||
| + | Serial.write(0xff); | ||
| + | Serial.write(0xff); | ||
| + | } | ||
| + | delay(100); | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ====Useful links==== | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[https:// | ||
| + | * [[http:// | ||
| + | * [[et: | ||