Hi and Help me please (I'm fairly new to arduino).
I'm using this video (link below) to try to get a hold of the nextion 2.8" basic model display.
I'm using it without the Nextion.h file and I'm downloading the nextion TFT file via microSD card to the display
Using the nextion editor is working and i'm doing the same as in the video (except I have 3 buttons instead of 5)
the display looks like I made it in the editor, but when I push the buttons nothing is printed on the serial monitor (except "hallo world).
What am I doing different/ wrong:
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println ("hallo world");
}
void loop() {
// put your main code here, to run repeatedly:
if (Serial.available()){
String data_from_display="";
delay(30);
while(Serial.available()){
data_from_display += char(Serial.read());
}
Serial.println(data_from_display);
sendData(data_from_display);
}
}
void sendData(String data_from_display){
if(data_from_display == "ON"){
Serial.println("on");
}
if(data_from_display == "OFF"){
Serial.println("off");
}
if(data_from_display == "MAIN"){
Serial.write("Main");
}
}
I'm using the arduino uno and I do have a stable 5V supply to the display. And ofc this connection between the two:
But my serial port... there is no action when I push the buttons Only shows "hallo world".
How can I make the connection work? Please Help!