Re: Please a little help for programming
Posted: Mar 4th, 2019, 2:21 pm
Contestando a Phila,
Por lo que he podido ver en su código, en la parte del Maestro, solo ha puesto que se reciben los datos del sensor DHT11, no ha incluido las librerías del sensor, entonces yo no lo entiendo, no digo que este mal, digo que yo no lo entiendo, ¿Como reconoce Arduino Maestro, quien (que sensor), le manda los datos, y que tipo de datos o señal, son los datos que le llegan?
Luego usted manda, en el void loop, que en la pantalla LCD se lean los datos de temperatura y humedad del sensor, esto si lo entiendo, pero no se por que se hace(si no hay sensor definido).
Después usted en la parte del Arduino esclavo, si pone la librería del sensor DHT, si define el pin correspondiente, y define el tipo de sensor, por lo tanto esto responde a mis preguntas anteriores, es el Arduino esclavo, quien se encarga de controlar los sensores, y al Maestro solo le manda los datos que el Esclavo ya sabe interpretar.
Por lo que mis sospechas son ciertas, no se programa igual en un sketch sencillo (directo al Arduino), que cuando intervienen un Arduino Maestro y un esclavo, ahora si lo entiendo.
No se lo va a creer, pero llevo mas de seis meses buscando en Internet cual puede ser el problema, sin encontrar solución, e incluso he tenido abiertos los dos sketch juntos para compararlos, y no veía donde podía estar el problema.
Ahora voy a ver si la compilación es correcta, y el problema se ha solucionado.
Muchas gracias por su tiempo
Answering Phila,
As far as I could see in your code, in the Master's part, you only said that the DHT11 sensor data is received, it has not included the sensor libraries, so I do not understand it, I do not say that this is wrong, I say that I do not understand, how does Arduino Maestro, who (what sensor), sends the data, and what kind of data or signal, are the data that comes to him?
Then you send, in the void loop, on the LCD screen to read the temperature and humidity data of the sensor, this if I understand it, but I do not know why it is done (if there is no sensor defined).
Then you in the part of the slave Arduino, if you put the library of the DHT sensor, if you define the corresponding pin, and define the type of sensor, therefore this answers my previous questions, is the Arduino slave, who is responsible for controlling the sensors, and the Master only sends him the data that the Slave already knows how to interpret.
As far as my suspicions are true, it is not programmed the same in a simple sketch (direct to the Arduino), that when an Arduino Maestro and a slave intervene, now I understand it.
He is not going to believe it, but I have been searching the Internet for more than six months to find out what the problem might be, without finding a solution, and I have even had the two skits open together to compare them, and I did not see where the problem could be.
Now I will see if the compilation is correct, and the problem has been solved.
Thank you very much for your time
Por lo que he podido ver en su código, en la parte del Maestro, solo ha puesto que se reciben los datos del sensor DHT11, no ha incluido las librerías del sensor, entonces yo no lo entiendo, no digo que este mal, digo que yo no lo entiendo, ¿Como reconoce Arduino Maestro, quien (que sensor), le manda los datos, y que tipo de datos o señal, son los datos que le llegan?
Luego usted manda, en el void loop, que en la pantalla LCD se lean los datos de temperatura y humedad del sensor, esto si lo entiendo, pero no se por que se hace(si no hay sensor definido).
Después usted en la parte del Arduino esclavo, si pone la librería del sensor DHT, si define el pin correspondiente, y define el tipo de sensor, por lo tanto esto responde a mis preguntas anteriores, es el Arduino esclavo, quien se encarga de controlar los sensores, y al Maestro solo le manda los datos que el Esclavo ya sabe interpretar.
Por lo que mis sospechas son ciertas, no se programa igual en un sketch sencillo (directo al Arduino), que cuando intervienen un Arduino Maestro y un esclavo, ahora si lo entiendo.
No se lo va a creer, pero llevo mas de seis meses buscando en Internet cual puede ser el problema, sin encontrar solución, e incluso he tenido abiertos los dos sketch juntos para compararlos, y no veía donde podía estar el problema.
Ahora voy a ver si la compilación es correcta, y el problema se ha solucionado.
Muchas gracias por su tiempo
Answering Phila,
As far as I could see in your code, in the Master's part, you only said that the DHT11 sensor data is received, it has not included the sensor libraries, so I do not understand it, I do not say that this is wrong, I say that I do not understand, how does Arduino Maestro, who (what sensor), sends the data, and what kind of data or signal, are the data that comes to him?
Then you send, in the void loop, on the LCD screen to read the temperature and humidity data of the sensor, this if I understand it, but I do not know why it is done (if there is no sensor defined).
Then you in the part of the slave Arduino, if you put the library of the DHT sensor, if you define the corresponding pin, and define the type of sensor, therefore this answers my previous questions, is the Arduino slave, who is responsible for controlling the sensors, and the Master only sends him the data that the Slave already knows how to interpret.
As far as my suspicions are true, it is not programmed the same in a simple sketch (direct to the Arduino), that when an Arduino Maestro and a slave intervene, now I understand it.
He is not going to believe it, but I have been searching the Internet for more than six months to find out what the problem might be, without finding a solution, and I have even had the two skits open together to compare them, and I did not see where the problem could be.
Now I will see if the compilation is correct, and the problem has been solved.
Thank you very much for your time