#include <Wire.h>
//#include <LCD.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Addr, En, Rw, Rs, d4, d5
void setup() {
//Serial.begin(9600); //setting the baud rate at 9600
//Ethernet.begin(mac,ip);
lcd.begin(16,2);
lcd.backlight();
lcd.setCursor(0, 0);
// lcd.print("Hello world!");
lcd.setCursor(0, 1);
// lcd.print("Row number: ");
lcd.setCursor(12, 1);
// lcd.print("2");
}
void loop() {
int sensorValue1 = analogRead(A0);
float tempvalue = sensorValue1 *(60.0/1023.0);
Serial.print("Temperature = ");
Serial.println(value);
lcd.clear();
lcd.print("Temp= ");
lcd.print(value);
lcd.print(" 0C");
String loggingvalue = (String(value));
log_db(loggingvalue);
delay(10000);
}
Comments
Please log in or sign up to comment.