Posts

Showing posts from January, 2020
Image
Arduino code #define trigPin 13 #define echoPin 12 #define led 7 #define buzzer 6 void setup() { pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(led, OUTPUT); pinMode(buzzer,OUTPUT); } void loop() { long duration, distance; digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance = (duration/2) / 29.1; if (distance < 70)// This is where checking the distance you can change the value { digitalWrite(led,HIGH); // When the the distance below 70cm digitalWrite(buzzer,HIGH); } else { digitalWrite(led,LOW);// when greater than 100cm digitalWrite(buzzer,LOW); } delay(500); }

teri meri songs tone using arduino with circuit diagram and code

Image
Teri meri Arduino code. Arduino code,  copy and pest // Teri Meri Meri Teri Prem Kahani by "Future Technology RC" int BuzzerPin = 9; //buzzer is connected to Pin 9 of the Board. int LEDPin = 10; int length = 100; // the number of notes char notes[] = "DAGAFGAFGAGFEDEDC DEFEFEGAGFEDD DAGAFGAFGAGFEDEDC DEFEFEGAGFEDD DAGAFGAFGAGFEDEDC DEFEFEGAGFEDD "; // a space represents a rest int beats[] = { 2,1,2,1,2,1,2,1,2,2,1,1,2,2,1,1,1,1,2,1,2,1,1,2,2,2,1,2,2,2,1,1,2,2,1,2,2,2,1,2,2,2,2,1,2,2,1,2,1,1,2,1,2,1,2,2,1,2,2,2,1,2,1,1,2,1,2,1,2,1,2,2,1,1,2,2,1,1,1,2,1,2,1,1,2,2,2,1,2,2,2,1,2,2,2,1,2,2,2,1, };//Duration of each note int tempo = 300; //Change song speed here void playTone(int tone, int duration) {  //creating a square wave for the given duration   for (long i = 0; i < duration * 1000L; i += tone * 2) {     digitalWrite(BuzzerPin, HIGH);      digitalWrite(LEDPin, HIGH);     delayMicroseconds(tone);     digitalWrite(BuzzerPin, LOW);  
Image
Arduino music jan gan man adhi  Arduino code int speakerPin = 9; //buzzer is connected to Pin 9 of the Board. int LEDPin = 10; int length = 155; // the number of notes char notes[] = "cdeeeeeeeeeeedef eeedddbdc cgggggfgggfag fffeefdfe eeeeedgggff eeeddddbdc cdeeeedef efgggfedfe eeddddbdc cgggggfgggfag fffeefdfe cbc bab aga cc dd ee de f _________ "; // a space represents a rest int beats[] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1  };//Duration of each note int tempo = 300; //Change song speed here void playTone(int tone, int duration) {  //creating a square wave for the given duration   for (long i = 0; i < duration * 1000L; i += tone * 2) {     digitalWrite(speakerPin, HIGH);  

metal detector using arduino

Image
metal detector using Arduino metal detector code, copy and pest  //*****" FUTURE TECHNOLOGY RC" (YOUTUBE CHANNEL) & my other channel is RC EXPERIMENTS HACKER***** // Metal objects near search loop change inductance. // ADC reading depends on inductance. // changes wrt long-running mean are indicated by LEDs // LED1 indicates a rise in inductance // LED2 indicates fall in inductance // the flash rate indicates how large the difference is // wiring: // 220Ohm resistor on D2 // 10-loop D=10cm seach loop between ground and resistor // diode (-) on pin A0 and (+) on loop-resistor connection // 10nF capacitor between A0 and ground // LED1 in series with 220Ohm resistor on pin 8 // LED2 in series with 220Ohm resistor on pin 9 const byte npulse = 3; const bool sound = true; const bool debug = false; const byte pin_pulse=A0; const byte pin_cap  =A1; const byte pin_LED1 =12; const byte pin_LED2 =11; const byte pin_t

self driving car using arduino

Self driving car using Arduino.               Self driving robot is an intelligent device which can automatically sense the obstacle in front of it and avoid them by turning itself in another direction. This design allows the robot to navigate in an unknown environment by avoiding collisions, which is a primary requirement for any autonomous mobile robot. The application of obstacle Avoiding robot is not limited and it is used in most of the military organization now which help carry out many risky jobs that can not be done by any soldiers.              This project we are going to use Arduino microcontroller, Ultrasonic sensor, Servo motor, gear motor, wheel, motor driver and battery. Here an Arduino id used to control the robot and an Ultrasonic sensor is used to sense the obstacle in the path and calculate the distance between the robot and obstacle and change the direction to continue moving. Component required. 1.       Arduino Uno. 2.       HC-SR04 Ultrasonic