Aviso

El foro está en modo de sólo lectura.

Arduino UNO and Nextion

Más
6 años 5 meses antes #789 por Jose Luis
Respuesta de Jose Luis sobre el tema Arduino UNO and Nextion
That error is that you do not have the libraries well installed or that you have the libraries of Itead and these at the same time.

   I would erase the libs that you have installed from the nextion and from the arduino editor (program / include library / Add zip library) I would install everything again.

   Right now, the arduino editor is not loading the libraries.
Más
6 años 5 meses antes #790 por gvardal
Respuesta de gvardal sobre el tema Arduino UNO and Nextion
I changed the ino files somethig like that
#include <SoftwareSerial.h>
#include <Nextion.h>

SoftwareSerial nextion(10, 11);
#define nextion Serial
Nextion myNextion(nextion, 9600);
int ledStatus = 13;
void setup() {//***************************************setup***********************************************
pinMode(ledStatus, OUTPUT);
digitalWrite(ledStatus, LOW);
Serial.begin(9600);
myNextion.init(); // INICIALIZA Y VA A LA PRIMERA PAGINA
}
void loop() {
boolean botonMarcha=myNextion.getComponentValue("page1.bt0");
Serial.println(botonMarcha);
if (botonMarcha == true) digitalWrite(ledStatus, HIGH); else digitalWrite(ledStatus, LOW);
delay(1000);
}//void loop()
and in serial monitor it shows the value always 1
Adjuntos:
Más
6 años 5 meses antes #791 por Jose Luis
Respuesta de Jose Luis sobre el tema Arduino UNO and Nextion
If the LED on the arduino board does not light up, it is not reading the data.

Try changing the pins 11 by 10 and 10 by 11.
Más
6 años 5 meses antes #792 por gvardal
Respuesta de gvardal sobre el tema Arduino UNO and Nextion
I tried this still same
Más
6 años 5 meses antes #793 por Jose Luis
Respuesta de Jose Luis sobre el tema Arduino UNO and Nextion
Okay, leave me a couple of hours, I'll set it up and verify that everything is correct.
Más
6 años 5 meses antes - 6 años 5 meses antes #794 por Jose Luis
Respuesta de Jose Luis sobre el tema Arduino UNO and Nextion
Ok, file had a line of more than you already realized before it was left over.

Now it works well.
Photo 1, motor without pressing on the screen. Led arduino off (led pin 13)




Photo 2, pulsed motor, Led Arduino On.




  I send the corrected file.



See how the nextion cables go in Arduino.
Pin 11 .. yellow
Pin 10 ... Blue
Adjuntos:
Última Edición: 6 años 5 meses antes por Jose Luis.
Tiempo de carga de la página: 0.294 segundos
Gracias a Foro Kunena