Fiz todo o passo a passo da aula e como sempre, deu tudo certo. Obrigado professor. Segue o código da aula. #include LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display const float BETA = 3950; // Deve corresponder ao coeficiente beta do termistor void setup() { // put your setup code here, to run once: Serial.begin(115200); Serial.println("Hello, ESP32!"); lcd.backlight(); lcd.init(); // initialize the lcd // Print a message to the LCD. lcd.backlight(); } void loop() { const float BETA = 3950; // Deve corresponder ao coeficiente beta do termistor int analogValue = analogRead(35); float celsius = 1 / (log(1 / (4095. / analogValue - 1)) / BETA + 1.0 / 298.15) - 273.15; String mensagem = ("Temperatura= " + String(celsius) + (char)223 + "C "); Serial.println(celsius); lcd.setCursor(3,0); lcd.print("Monitorando"); lcd.setCursor(0,1); lcd.print(mensagem); }
@clubedaeletronica69085 ай бұрын
que bom que ajudou.
@caca1960ful7 ай бұрын
Bom dia! Show de bola, cada dia aprendendo +. Uma dúvida: caso eu venha a comprar um LCD como a seguir: > Tela de exibição inteligente para Arduino, ESP32, 2.8 "Touch Screen para LVGL, WiFi, Bluetooth, 240x320, TFT, Módulo LCD, o código que foi passado vai funcionar?