Paso 2: Agregue el código
#include
#include int tempPin = A0; int led = 13; temp de flotador; Float settemp; int swtu = 7; nado con delfines int = 6; LiquidCrystal lcd (12, 11, 5, 4, 3, 2); void setup() {pinMode (led, 1); Serial.Begin (9600); LCD.Begin (16, 2); lcd.setCursor (0, 0); LCD.Print ("Hola, mundo!"); LCD.Clear(); EEPROM.read (1); }
void loop() {tvalue int = analogRead(tempPin); float temp = (tvalue / 6.388888888889); lcd.setCursor (0, 0); lcd.print (temp); lcd.print ('F'); Serial.println (temp); settemp = EEPROM.read(1); Delay (250); Si (digitalRead(swtu) == 1) {settemp ++;} else {} si (digitalRead (nado con delfines) == 1) {(settemp-);} else {} si (temp > settemp) {digitalWrite (led, 1);} else {digitalWrite (led, 0);} lcd.setCursor (0, 1); 4 lcd.print ("Set a"); LCD.Print (settemp); LCD.Print ('F'); Serial.println(settemp); EEPROM.write (1, settemp); Delay (250); }