diff --git a/src/lcd/lcd.ino b/src/lcd/lcd.ino new file mode 100644 index 0000000000000000000000000000000000000000..ea5a7a062fea3149181b09437101b01e5dfd93a6 --- /dev/null +++ b/src/lcd/lcd.ino @@ -0,0 +1,20 @@ +#include <Wire.h> +#include <LiquidCrystal_I2C.h> + +// Set the LCD address to 0x27 for a 16 chars and 2 line display +LiquidCrystal_I2C lcd(0x3F,16,2); + +void setup() +{ + // initialize the LCD + lcd.init(); + + // Turn on the blacklight and print a message. + lcd.backlight(); + lcd.print("Hello, world!"); +} + +void loop() +{ + // Do nothing here... +} diff --git a/src/lib/LiquidCrystal_I2C.zip b/src/lib/LiquidCrystal_I2C.zip new file mode 100644 index 0000000000000000000000000000000000000000..d40f3ec9ee0e4724e2e544a46d3e4e5ae7f9f9f4 Binary files /dev/null and b/src/lib/LiquidCrystal_I2C.zip differ diff --git a/src/main/main.ino b/src/main/main.ino index 4b564516adf8b6ee302c33b6cce8e264af0dc37f..249adb081a4dd6b74537d635c057ce2d7f3c307a 100644 --- a/src/main/main.ino +++ b/src/main/main.ino @@ -49,6 +49,5 @@ int readSoil() { delay(10); val = analogRead(soilPin); digitalWrite(soilPower, LOW); - return val/1023*100; //send current moisture value + return 1023-val; //send current moisture value } -