Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void mostra_endereco_sensor(DeviceAddress deviceAddress)
- {
- for (uint8_t i = 0; i < 8; i++)
- {
- // Adiciona zeros se necessário
- if (deviceAddress[i] < 16) Serial.print("0");
- Serial.print(deviceAddress[i], HEX);
- }
- }
- void loop()
- {
- // Le a informacao do sensor
- sensors.requestTemperatures();
- float tempC = sensors.getTempC(sensor1);
- // Atualiza temperaturas minima e maxima
- // if (tempC < tempMin)
- // {
- // tempMin = tempC;
- // }
- // if (tempC > tempMax)
- // {
- // tempMax = tempC;
- // }
- // Mostra dados no serial monitor
- Serial.print("Temp C: ");
- Serial.print(tempC);
- // Serial.print(" Min : ");
- // Serial.print(tempMin);
- // Serial.print(" Max : ");
- // Serial.println(tempMax);
- //
- // Mostra dados no LCD
- // lcd.clear();
- // lcd.setCursor(0,0);
- // lcd.print("Temp.: ");
- // //Simbolo grau
- // lcd.write(223);
- // lcd.print("C");
- // lcd.setCursor(7,0);
- // lcd.print(tempC);
- // lcd.setCursor(0,1);
- // lcd.print("L: ");
- // lcd.setCursor(3,1);
- // lcd.print(tempMin,1);
- // lcd.setCursor(8,1);
- // lcd.print("H: ");
- // lcd.setCursor(11,1);
- // lcd.print(tempMax,1);
- delay(3000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement