1
I’m using the simulator https://www.tinkercad.com.
I am unable to do it appears the test message on the display. When calling does not show message, just turn on the display.
What I’m doing wrong?
Do not pay attention to the other components, only the test message to be displayed on the LCD.
#include <LiquidCrystal.h>
int temperatura = 0;
LiquidCrystal lcd(9,8,5,4,3,2);
void setup()
{
//Confg LCD
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print("Teste");
//Senssor temp
pinMode(A0, INPUT);
//LEDs
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
}
void loop()
{
temperatura = analogRead(A0);
if (temperatura >= -40 || temperatura <= 15) {
digitalWrite(11, HIGH);
digitalWrite(12, LOW);
digitalWrite(13, LOW);
}
if (temperatura >= 16 || temperatura <= 23) {
digitalWrite(11, LOW);
digitalWrite(12, HIGH);
digitalWrite(13, LOW);
}
if (temperatura >= 24 || temperatura <= 125) {
digitalWrite(11, LOW);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
}
//LCD
lcd.setCursor(0,1);
lcd.print("Teste 2");
//delay(10); // Delay a little bit to improve simulation performance
}
@Maniero, what you don’t understand?
– Tiago
The question is just that you have a problem, and a loose code, no one even knows what should be right, how do you know it’s a problem, what you tried to solve, because you think it didn’t work. Put information that helps people help you, these people understand less than you of your problem, need to explain it fully.
– Maniero