Soil Moisture sensor with Arduino in Tinkercad | how to use soil moisture sensor in Tinkercad Circuit diagram: Arduino Sketch: // C++ code // int moisture_data = 0; void setup() { pinMode(A0, INPUT); Serial.begin(9600); pinMode(12, OUTPUT); pinMode(6, OUTPUT); } void loop() { moisture_data = analogRead(A0); Serial.println(moisture_data); if (moisture_data < 21) { digitalWrite(12, HIGH); digitalWrite(6, HIGH); } else { digitalWrite(12, LOW); digitalWrite(6, LOW); } delay(10); // Delay a little bit to improve simulation performance }
How to send sensor data from Arduino IoT cloud to Email | webhook & IFTTT with Arduino IoT cloud.
- Get link
- X
- Other Apps
- Get link
- X
- Other Apps
Comments
Post a Comment
If you any query please comment