Sun Tracker Solar Panel - Circuit Diagram | Dual Axis Without Arduino | Harish Projects
Circuit Components List 1. TDA2822 IC 2x 2. 10k ohm Resistor 4x 3. 5mm LDR 4x 4. N20 Gear Motor 2x 5. N20 Wheel 6. Solar Panel 7. Zero PCB 8. Sunboard 9. 3.7v Small Battery 10. Charging Module 11. Tip Top Button Ordre all components from Here Click here 👉 https://harishprojects.com/ …….. Circuit Diagram……….. ……….Watch full Detailed video………
Comments
motors are not rotating
Contact number 6361687608
int sensor_pin = 5;
int tap_servo_pin =4;
Please tell me what's the problem.
#include
const int soilMoisturePin = A0;
const int servoPin = 9; // Adjust these pin numbers according to your setup
const int servo2Pin = 10; // Second servo pin
const int moistureThreshold = 500; // Adjust this value according to your sensor's readings
Servo bridgeServo;
Servo bridgeServo2;
// Define angles for lifted and lowered positions
const int liftedAngle = 90;
const int loweredAngle = 0;
void setup() {
pinMode(soilMoisturePin, INPUT);
bridgeServo.attach(servoPin);
bridgeServo2.attach(servo2Pin);
}
void loop() {
int moistureLevel = analogRead(soilMoisturePin);
if (moistureLevel < moistureThreshold) {
// If soil is moist enough, lift the bridge
liftBridge();
} else {
// Otherwise, keep the bridge down
lowerBridge();
}
}
void liftBridge() {
// Move the servo motors to lift the bridge
bridgeServo.write(liftedAngle); // Use lifted angle
bridgeServo2.write(liftedAngle); // Second servo angle
delay(1500); // Adjust delay as needed
}
void lowerBridge() {
// Move the servo motors to lower the bridge
bridgeServo.write(loweredAngle); // Use lowered angle
bridgeServo2.write(loweredAngle); // Second servo angle
delay(1500); // Adjust delay as needed
}
You should change the signal pin number to 9 and 10
Could someone ping the correct code,it will me more helpful for the students who are working on it.