Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamslowik359 wrote:Welcome to the forum!why does it display to me not the exact decimal value in esp8266 wifi e.g. 28.50 ,34.00 ,25.50 ,22.50 and before it was 34.12 or 28.18 https://obrazki.elektroda.pl/2611699600_1694342459.png
slowik359 wrote:Thanks for providing the full code again. It seems correct and should not cause problems with rounding to .50 or .00. The DallasTemperature library you are using returns the temperature as a `float`, so you should get a full precision reading.(...) t width height temp
display.println(temp);
display.println(" ");
display.drawRect(123,30, 5, 5, WHITE); // this is from the celsius sign
display.setCursor(110,25);
display.setFont();
display.display();
Blynk.virtualWrite(V2, temp); //sending to Blynk app
delay(5000);
}
slowik359 wrote:I noticed that despite using `dtostrf(temp, 4, 2, temp_display);` in your code, you still call `display.println(temp);` to display the temperature. This line will print the `float` value of temp, not the converted `temp_display` string.(...) t width height temp
display.println(temp);
display.println(" ");
display.drawRect(123,30, 5, 5, WHITE); // this is from the celsius sign
display.setCursor(110,25);
display.setFont();
display.display();
Blynk.virtualWrite(V2, temp); //sending to Blynk app
delay(5000);
}
slowik359 wrote:I guess when you say "on the test one with the arduino it is the same", you are trying to use a different microcontroller to test the same sensor? If so, and you still see the same results, it is possible that the problem actually lies with the DS18B20 sensor.it didn't help because on the test one with the arduino it is the same maybe the sensor is dead
slowik359 wrote:Flashing the ESP8266 is the process of writing new firmware to the microcontroller. If you suspect the problem lies with this, it may be worth trying to re-flash the microcontroller. Below are the steps you should take. I use a tool called "esptool" for this.The problem may lie in the fact that I have flashing it several times with the espe tool I don't know if I did it right maybe you need to do it again could you provide what and how
slowik359 wrote:I understand that you may be having trouble finding the correct firmware file for your ESP8266 module. Let me help you.I may not be familiar with this binary file
slowik359 wrote:It looks like you are still having problems finding the binary file. I apologise for any confusion. Please let me direct you more accurately.I cannot know this binary file
// set resolution of all devices to 9, 10, 11, or 12 bits
// if new resolution is out of range, it is constrained.
void DallasTemperature::setResolution(uint8_t newResolution);
DS18B20.begin();
DS18B20.setResolution(12);