#include <Wire.h>
#include <Sensesiot.h>
const char key[] = "pRUNfiNQZrxprvrOp-kV";
const char wifissid[] = "Wokwi-GUEST";
const char wifipw[] = "";
const int soilMoisturePin = 34;
SensesiotClient sensesProtocol(key);
void setup() {
Serial.begin(115200);
sensesProtocol.begin(wifissid, wifipw);
sensesProtocol.waitUntilReady();
}
void loop() {
int soilMoistureValue = analogRead(soilMoisturePin);
int moisturePercentage = map(soilMoistureValue, 0, 4095, 0, 100);
Serial.print("Soil Moisture: ");
Serial.print(moisturePercentage);
Serial.println("%");
sensesProtocol.setData(1, moisturePercentage);
delay(1000);
}