Thank you for your help.
I finally display the values (thanks to you ) , but I should use two different way, one for temperature, and another for humidity:
snprintf(buffer3, sizeof(buffer3), "%.1f", tempFroid);
int humi = dht.getHumidity();
memset(buffer4, 0, sizeof(buffer4));
itoa(humi, buffer4, 10);
If I use the same way for humidity and temperature, the temperature is print in the humidity field.
And I also should add this command:
USARTSerial& nexSerial = Serial1; before the setup, otherwise I had some errors with the library (
But now, I have a different problem. I wanted to use and print the time on the display, so I took a look on the particle documentation: https://docs.particle.io/reference/firmware/photon/#timestr- an when I use and print
Time.now(); on the screen, it works well, but I have something like that: 1400647897 that's apparently normal, but I don't know how to read or change that (I tried some thing found in the documentation like:
but nothing works and I don't really know where to place it and where to find the time zone for my country).
So I use two
int, one for the minutes and one for the hour, displayed in two different field on my Nextion. It works fine, but I have two hours less than the hour in my country, and the time change about every 20 minutes and I don't know why. Here the code for the time (placed in the void loop();
memset(buffer5, 0, sizeof(buffer5));
itoa(hourTime, buffer5, 10);
memset(buffer6, 0, sizeof(buffer6));
itoa(minuteTime, buffer6, 10);
Thank you again for your help.