//
// Exercício 1 da lista Sistemas Embarcados
// 5.9 Project 5 - Temperature measurement –
// using an external temperature sensor and with parallel LCD
//Matheus Manfio - 30/11/23
//
#include <DallasTemperature.h>
#include <LiquidCrystal.h>
#include <OneWire.h>
#include <LiquidCrystal.h>
#define ONE_WIRE_BUS 26
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);
void setup() {
lcd.begin(16, 2);
lcd.clear();
sensors.begin();
delay(1000);
Serial.begin(9600);
}
void loop() {
sensors.requestTemperatures();
float tempC =
sensors.getTempCByIndex(0); // variável recebe a temperatura em ºC
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Temperatura:");
lcd.setCursor(0, 1);
lcd.print(tempC+104+46);
lcd.setCursor (6,1);
lcd.print("Celsus");
delay(1000);
}
pico1:GP0
pico1:GP1
pico1:GND.1
pico1:GP2
pico1:GP3
pico1:GP4
pico1:GP5
pico1:GND.2
pico1:GP6
pico1:GP7
pico1:GP8
pico1:GP9
pico1:GND.3
pico1:GP10
pico1:GP11
pico1:GP12
pico1:GP13
pico1:GND.4
pico1:GP14
pico1:GP15
pico1:GP16
pico1:GP17
pico1:GND.5
pico1:GP18
pico1:GP19
pico1:GP20
pico1:GP21
pico1:GND.6
pico1:GP22
pico1:RUN
pico1:GP26
pico1:GP27
pico1:GND.7
pico1:GP28
pico1:ADC_VREF
pico1:3V3
pico1:3V3_EN
pico1:GND.8
pico1:VSYS
pico1:VBUS
lcd1:VSS
lcd1:VDD
lcd1:V0
lcd1:RS
lcd1:RW
lcd1:E
lcd1:D0
lcd1:D1
lcd1:D2
lcd1:D3
lcd1:D4
lcd1:D5
lcd1:D6
lcd1:D7
lcd1:A
lcd1:K
r1:1
r1:2
Loading
ds18b20
ds18b20
r2:1
r2:2