read better values
This commit is contained in:
parent
df95393980
commit
a8c87e3f54
|
@ -59,6 +59,11 @@ extern uint16_t moisture_voltage;
|
|||
static void
|
||||
res_get_handler(void *request, void *response, uint8_t *buffer, uint16_t preferred_size, int32_t *offset)
|
||||
{
|
||||
int a=0;
|
||||
for(a=0;a<10;a++){
|
||||
digitalWrite(moisture_vcc, HIGH);
|
||||
digitalWrite(moisture_vcc, LOW);
|
||||
}
|
||||
digitalWrite(moisture_vcc, HIGH);
|
||||
moisture_voltage = analogRead(moisture_pin);
|
||||
digitalWrite(moisture_vcc, LOW);
|
||||
|
|
Loading…
Reference in a new issue