#include #include "rgb_lcd.h" rgb_lcd lcd; const int colorR = 250; const int colorG = 0; const int colorB = 0; int pos = 0; int sensorValue = 0; void setup() { Serial.begin(9600); // set up the LCD's number of columns and rows: lcd.begin(16, 2); lcd.print("Rain detector"); delay(5000); } void loop() { sensorValue = analogRead(A0); Serial.println(sensorValue); if(sensorValue>800){ lcd.setCursor(0,1); lcd.print(" Het is droog "); delay(1000); } if(sensorValue<=800 && sensorValue>500){ lcd.setCursor(0,1); lcd.print(" Lichte regen "); delay(1000); } if(sensorValue<=500 && sensorValue>300){ lcd.setCursor(0,1); lcd.print(" Matige regen "); delay(1000); } if(sensorValue<300){ lcd.setCursor(0,1); lcd.print(" Veel regen "); delay(1000); } } // end of example code.