Described used ultra sonic sensor

This commit is contained in:
Ollo 2020-12-21 16:18:22 +01:00
parent 63708eeecc
commit 37c83ecef8
2 changed files with 5 additions and 1 deletions

View File

@ -18,6 +18,7 @@ Uses ESP32MiniKit
* Solar powered (voltage) * Solar powered (voltage)
* Lipo-Powered (voltage) * Lipo-Powered (voltage)
* Temperature * Temperature
* Distance sensor [JSN-SR04T-2.0] (for waterlevel)
* Custom GPIO * Custom GPIO
## Documentation of Power-Modes ## Documentation of Power-Modes

View File

@ -404,7 +404,10 @@ long getLastActivationForPump(int plantId)
} }
} }
/* Use the Ultrasonic sensor to measure waterLevel */ /**
* @brief Read ultra sensor JSN-SR04T-2.0
* Read the distance of the water level.
*/
void readDistance() void readDistance()
{ {
for (int i = 0; i < 5; i++) for (int i = 0; i < 5; i++)