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 }
Interfacing of LDR sensor with arduino using Tinkercad In this project, we are using LDR as a Light Sensor with an Arduino to control a LED light and Buzzer as per light condition of the room. The LED light and Buzzer will turns ON automatically when there is less light intensity outside or inside the room and turns off when it is bright outside or inside the room. For this, we need LDR sensor to detect the light intensity inside or outside the room. And an Arduino to control the Buzzer and LED It’s like a dark detecting circuit . Circuit Diagram: Components Required: § Arduino UNO § LDR (Light Dependent Resistor) § Resistor (10k) § LED - 1 § Buzzer Connecting wires Connection: The hardware a part of this project is extremely easy to place together. First of all, make the connections for the LDR sensor with the Arduino. The connections for the LDR sensor with the Arduino given in above circuit diagram: Conne...