Latest code (with water)

This commit is contained in:
Nico Schottelius 2016-09-16 23:49:20 +02:00
parent 39825d2a0a
commit 3c817ce36a

View file

@ -79,9 +79,6 @@ void setupLED() {
pinMode(LED_BLUE, OUTPUT);
}
void setupWater() {
pinMode(WATER_SENSOR, INPUT);
}
// OTAA
// Random numbers chosen + device id
@ -116,6 +113,11 @@ float readLight()
return (float)(1023-sensorValue)*10/sensorValue;
}
void setupWater() {
pinMode(WATER_SENSOR, INPUT);
}
boolean hasWater()
{
if(digitalRead(WATER_SENSOR) == LOW) {