Advance Solar Tracking and Automatic Sprinkler Irrigation Science Project

preview_player
Показать описание
Only 0$ for 1-4 layer PCB Prototypes :

Register and get $100 from NextPCB:

-------------------------------------------------------------

-------------------------------------------------------------

Code- Check My Pinned Comment

-------------------------------------------------------------

Follow me-

Thanks for Watching......

#iot #arduino
Рекомендации по теме
Комментарии
Автор

#include <Servo.h>

Servo horizontal; // horizontal servo
int servoh = 180;
int servohLimitHigh = 120;
int servohLimitLow = 5;
// 65 degrees MAX

Servo vertical; // vertical servo
int servov = 0;
int servovLimitHigh = 120;
int servovLimitLow = 5;

// LDR pin connections
// name = analogpin;
int ldrlt = A1; //LDR top left - BOTTOM LEFT <--- BDG
int ldrrt = A2; //LDR top rigt - BOTTOM RIGHT
int ldrld = A5; //LDR down left - TOP LEFT
int ldrrd = A3; //ldr down rigt - TOP RIGHT
int ldrmt = A4;


const int motorA = 7;



int pos = 0;
int pos2 = 0;
int oldvalue;
int oldvalue2;


void setup(){
horizontal.write(120);
horizontal.attach(6);
vertical.write(120);
vertical.attach(5);
pinMode(motorA, OUTPUT);

delay(2500);
}
void loop() {
int ldrStatus = digitalRead(ldrmt);
if (ldrStatus == HIGH) {
{digitalWrite(motorA, HIGH);
}}else{digitalWrite(motorA, LOW);

}

int lt = analogRead(ldrlt); // top left
int rt = analogRead(ldrrt); // top right
int ld = analogRead(ldrld); // down left
int rd = analogRead(ldrrd); // down right
int dtime = 10; int tol = 90; // dtime=diffirence time, tol=toleransi
int avt = (lt + rt) / 2; // average value top
int avd = (ld + rd) / 2; // average value down
int avl = (lt + ld) / 2; // average value left
int avr = (rt + rd) / 2; // average value right
int dvert = avt - avd; // check the diffirence of up and down
int dhoriz = avl - avr;// check the diffirence og left and rigt


if (-1*tol > dvert || dvert > tol)
{
if (avt > avd)
{
servov = ++servov;
if (servov > servovLimitHigh)
{servov = servovLimitHigh;}
}
else if (avt < avd)
{servov= --servov;
if (servov < servovLimitLow)
{ servov = servovLimitLow;}
}
vertical.write(servov);
}
if (-1*tol > dhoriz || dhoriz > tol) // check if the diffirence is in the tolerance else change horizontal angle
{
if (avl > avr)
{
servoh = --servoh;
if (servoh < servohLimitLow)
{
servoh = servohLimitLow;
}
}
else if (avl < avr)
{
servoh = ++servoh;
if (servoh > servohLimitHigh)
{
servoh = servohLimitHigh;
}
}
else if (avl = avr)
{
delay(10);
}
horizontal.write(servoh);
delay(dtime);
}
else{
oldvalue = horizontal.read();
oldvalue2 = vertical.read();

for (pos = oldvalue; pos <= 120; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
horizontal.write(pos);
delay(15);
}
for (pos2 = oldvalue2; pos2 <= 0; pos2 += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree

vertical.write(pos2); // tell servo to go to position in variable 'pos'
delay(15);}

}}

techboystoys
Автор

Hi, amazing project and I really want to make it, so can you please tell what are the components to be used as without that this video would be of no use. I searched your website but there are no details for this specific project. So kindly please either send a link so we can know the components, it would be really appreciated.

rayyanakbar
Автор

Bro could you please tell us the details of the components used in this project this project is so interesting and amazing I really want to do this project

devouringtoperfectorigin
Автор

Naming the materials/components used could be helpful

Justus-qi
Автор

Bro kindly tell the details of the material used I mean list of material

ankushsharma
Автор

It's amazing but can you pls tell me the materials needed for this project i really want to make it

DDKS
Автор

Such a wonderful project👏best topic ever👍👍👍👍👍

chinmayeebaisakh
Автор

It's awesome. But can send the list of the materials. The link in the description is not responding.

anamika
Автор

please provide 3D part prints and material details. this project is not on your website

anerisenza
Автор

Bhai ye coding notepad pe type carni hai or paste karni hai ardiuno nano pe

arpitsingh
Автор

Sir apne repot bnai hai to bhejiye mujhe bana hai yeh sare saman kaha se laya hai btaye

ankushgupta
Автор

Bro please please please tell the code of circuit which uh have used to make this project

abdulr.
Автор

Hey bro what type of transistor you use? Tip122? NPN OR PNP? and 7806? NPN OR PNP? thank you for response bro

PixELonics
Автор

Tell me without arduino how to do this its urgent..

manishabanik
Автор

I want to make this project for school ... ...i need these material ...

Attractionart
Автор

What are the things names used in the project

taslimarashed
Автор

Bro in egg drawing machine can I use Arduino Uno r3 and cnc shield V3 please tell i am making for my school model please and day after tomorrow i have to go school so please please please please please please please please tell

emaker
Автор

How to buy components for this project

shubhammahajan-tiby
Автор

what are the tools sorry for what, I don't know

muhammadzulvikarrahmatalla
Автор

What is the cost of this whole project including the 3d parts ???

sknazrulislam