finish basic funtunalitiy

This commit is contained in:
2022-04-10 18:53:40 +02:00
parent 927fe3080f
commit 373ea07fff
3 changed files with 95 additions and 23 deletions

View File

@@ -0,0 +1,26 @@
void setup() {
pinMode(2, INPUT);
pinMode(A4, INPUT);
Serial.begin(19200);
float poty;
float dampness;
}
void loop() {
Serial.println(digitalRead(2));
delay(200);
Serial.println(analogRead(A4));
Serial.println(percentage() ,4);
delay(20);
}
float percentage(){
// float poty = analogRead(A2);
//return poty/454;
return analogRead(A4) / 454;
}