From 9c46729c599ef418bbc92d51fd0539b98e4724f0 Mon Sep 17 00:00:00 2001 From: xTechnoErikx Date: Sun, 10 Apr 2022 19:06:45 +0200 Subject: [PATCH] finish script to read out the pottys for insertion in the main programm --- src/calibrateSleep/calibrateSleep.ino | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/calibrateSleep/calibrateSleep.ino b/src/calibrateSleep/calibrateSleep.ino index 2ce72d8..ff0a6e0 100644 --- a/src/calibrateSleep/calibrateSleep.ino +++ b/src/calibrateSleep/calibrateSleep.ino @@ -2,10 +2,9 @@ void setup() { pinMode(2, INPUT); pinMode(A4, INPUT); + pinMode(A2, INPUT); + pinMode(A0, INPUT); Serial.begin(19200); - float poty; - float dampness; - } @@ -13,14 +12,7 @@ void loop() { Serial.println(digitalRead(2)); delay(200); Serial.println(analogRead(A4)); - Serial.println(percentage() ,4); - delay(20); + Serial.println(analogRead(A2)); + Serial.println(analogRead(A0)); + delay(1000); } - -float percentage(){ - -// float poty = analogRead(A2); - //return poty/454; - return analogRead(A4) / 454; - - }