delay(2000);
if (bus.transaction(request, sizeof(request), response, sizeof(response))) response[4]; Serial.print("Moisture: "); Serial.println(soilMoisture); else Serial.println("No response or CRC error");
void loop() byte request[] = 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x31, 0xCA; byte response[20];
Download Arduino | Openwire.h Library
delay(2000);
if (bus.transaction(request, sizeof(request), response, sizeof(response))) response[4]; Serial.print("Moisture: "); Serial.println(soilMoisture); else Serial.println("No response or CRC error");
void loop() byte request[] = 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x31, 0xCA; byte response[20];