Hello I am trying to send some numbers from my arduino leonardo to my nextion 7 inch Intelligent for a progress bar but it will not work.
int MPH;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
MPH = 50;
Serial.print("j0.val=\""); // Changing the value of box n1
Serial.print(MPH);
Serial.print("\"");
Serial.write(0xff); // We always have to send this three lines after each command sent to the nextion display.
Serial.write(0xff);
Serial.write(0xff);
Serial.println("END");
}
I have connected the yellow wire RX to the TX on the arduino and the ground cable to the arduino but I have to connect the power cable to an external power source otherwise the screen flickers majorly.