123samridhgarg
Published © GPL3+

Blind smart cap

Cap for blind people made with using arduino and ultrasonic sensor

BeginnerFull instructions provided3,898
Blind smart cap

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×3
Buzzer
Buzzer
×2
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×3
Jumper wires (generic)
Jumper wires (generic)
×17
9V battery (generic)
9V battery (generic)
×1

Story

Read more

Schematics

diagram of the circuit

Code

code for blind smart cap

Arduino
#define trigPin 10
#define echoPin 9
#define buzzPin 2

void setup()
{
pinMode(trigPin, OUTPUT); //FOR ONE ULTRASONIC SENSOR ONLY
pinMode(echoPin, INPUT);
pinModse(buzzPin,OUTPUT);
}

void loop()
{
long duration, distance;

digitalWrite(trigPin, LOW); 
delayMicroseconds(2); 

digitalWrite(trigPin, HIGH);
delayMicroseconds(2);

duration = pulseIn(echoPin, HIGH);
distance = (duration/2) / 29.1;

if (distance < 40)
{ 
digitalWrite(buzzPin,HIGH);
} else
{
digitalWrite(buzzPin,LOW);
} delay(60);
}

Credits

123samridhgarg
2 projects • 8 followers
Contact

Comments

Please log in or sign up to comment.