//Code Description: //The moisture , humidity and temperature sensors are interfaced // The reading is stored and published on the console int moistureSensor=A1; //analog pins to read the sensor data int moistureValue; //variable to store the sensor data int set=D4; //digital pin to power up the nails void setup() { Serial.begin(9600); pinMode(set,OUTPUT); digitalWrite(set,HIGH); } void loop() { //read the sensor data and store it in a variable //convert the data to a string //publish that data to particle console with an event name moistureValue=analogRead(moistureSensor); Particle.publish("PlantData",String(moistureValue)); Serial.println(moistureValue); delay(1000); }