Watch Full Detailed video 👇🏻 Diagram in Video👆 //Arduino Code// //YouTube: Harish Projects //Order Electronic Parts & Project kit: HarishProjects.com // #include <Servo.h> Servo servo1; const int trigPin = 12; const int echoPin = 11; long duration; int distance=0; int potPin = A0; //input pin int soil=0; int fsoil; void setup() { Serial.begin(9600); //Serial.print("Humidity"); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); servo1.attach(8); } void loop() { //YouTube: Harish Projects //Order Electronic Parts & Project kit: HarishProjects.com // int soil=0; for(int i=0;i<2;i++) { digitalWrite(trigPin, LOW); delayMicroseconds(7); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); delayMicroseconds(10); duration = pulseIn(echoPin, HIGH); distance= duration*0.034/2+distance; delay(10); } distance=distance/2; Serial.println(distance); if (distance <20 && distance>1) { delay(1000); for(int i
Automatic Railway Gate | Arduino & IR sensor Best science Project 2023 | Harish Projects
- Get link
- X
- Other Apps
....Watch Full Detailed video....
//Arduino code//
/*
1. If an object is detected, turn the
servo motor 10 degrees
2. If there is no object detected,
turn the servo motor 150 degrees
*/
#include <Servo.h>
Servo Serv;
int pinIR=3;
int pinServo=5;
int val=0;
void setup(){
Serv.attach(pinServo);
}
void loop(){
val = digitalRead(pinIR);
if (val ==0){
Serv.write(95);
delay(100);
}
else
{
Serv.write(10);
delay(100);
}
}
//You can order Project kit from us.
Contact:-
WP - 8602221288
Instagram - https://www.instagram.com/harishchoudhary70/reels/?hl=en
- Get link
- X
- Other Apps
Popular posts from this blog
Smart Bridge - Automatic Hight increase when flooding | Best science Project
Watch video on YouTube. //Arduino Code// //Code by Harish Projects //Orde science projects kit & electronics parts from "HarishProjects.com" #include <Servo.h> //Install this library Servo tap_servo; int sensor_pin = 5 ; //Connect D5 of Arduino int tap_servo_pin = 4 ; //Connect D4 of Arduino int val; void setup (){ pinMode (sensor_pin,INPUT); tap_servo . attach (tap_servo_pin); } void loop (){ val = digitalRead (sensor_pin); if (val== 0 ) { tap_servo . write ( 0 ); } if (val== 1 ) { tap_servo . write ( 90 ); //If you want you can increase & Decrease servo rotation } } //Project Diagram 1 // //Project Diagram 2// Contact us for support - https://www.instagram.com/harishchoudhary70/
How to make Phone control RC car using Arduino #phoneControlCar
https://www.youtube.com/watch?v=EYlIB1PQ8R0&t=131s ......................ARDUINO CODE................. char t ; void setup () { pinMode ( 13 , OUTPUT ); //left motors forward pinMode ( 12 , OUTPUT ); //left motors reverse pinMode ( 11 , OUTPUT ); //right motors forward pinMode ( 10 , OUTPUT ); //right motors reverse pinMode ( 9 , OUTPUT ); //Led Serial . begin ( 9600 ); } void loop () { if ( Serial . available ()){ t = Serial . read (); Serial . println ( t ); } if ( t == 'F' ){ //move forward(all motors rotate in forward direction) digitalWrite ( 13 , HIGH ); digitalWrite ( 11 , HIGH ); } else if ( t == 'B' ){ //move reverse (all motors rotate in reverse direction) digitalWrite ( 12 , HIGH ); digitalWrite ( 10 , HIGH ); } else if ( t == 'L' ){ //turn right (left side motor
Inspire Award Project | Train accident Prevention project | Best science Project / Harish Projects
Full Making video Link - https://youtu.be/nz6UnFjr__g //Arduino Code// const int trigPin = 12 ; const int echoPin = 13 ; const int LED1 = A0 ; const int LED2 = A1 ; const int LED3 = A2 ; const int LED4 = A3 ; const int LED5 = A4 ; const int LED6 = A5 ; const int LED7 = 2 ; int duration = 0 ; int distance = 0 ; void setup () { pinMode ( trigPin , OUTPUT ); pinMode ( echoPin , INPUT ); pinMode ( LED1 , OUTPUT ); pinMode ( LED2 , OUTPUT ); pinMode ( LED3 , OUTPUT ); pinMode ( LED4 , OUTPUT ); pinMode ( LED5 , OUTPUT ); pinMode ( LED6 , OUTPUT ); pinMode ( LED7 , OUTPUT ); Serial . begin ( 9600 ); } void loop () { digitalWrite ( trigPin , LOW ); delayMicroseconds ( 2 ); digitalWrite ( trigPin , HIGH ); delayMicroseconds ( 10 ); digitalWrite ( trigPin , LOW ); duration = pulseIn ( echoPin , HIGH ); distance = duration / 58.2 ; if ( dist
Comments