Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
mohammadsohail0008
Published © GPL3+

Smart Stick for Blind Peoples

Smart Blind Stick

IntermediateFull instructions provided75,104
Smart Stick for Blind Peoples

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1
Buzzer
Buzzer
×1
9V battery (generic)
9V battery (generic)
×1
9V Battery Clip
9V Battery Clip
×1
Pushbutton Switch, Momentary
Pushbutton Switch, Momentary
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)
Wooden Stick

Story

Read more

Schematics

Circuit Diagram

Code

Code

Arduino
// https://www.youtube.com/channel/UCaXI2PcsTlH5g0et67kdD6g  //
// Smart Stick for Blind peoples //
// By MOHD SOHAIL //

const int trigPin = 3;
const int echoPin = 2;
const int buzzer = 5;
const int motorPin = 6;


long duration;
int distance;
int safetyDistance;


void setup() {
pinMode(trigPin, OUTPUT); 
pinMode(echoPin, INPUT); 
pinMode(buzzer, OUTPUT);
pinMode(motorPin, 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*0.034/2;

safetyDistance = distance;
if (safetyDistance <= 30){
  digitalWrite(buzzer, HIGH);
  digitalWrite(motorPin, HIGH);
}
else{
  digitalWrite(buzzer, LOW);
  digitalWrite(motorPin, LOW);
}


Serial.print("Distance: ");
Serial.println(distance);
}

Credits

mohammadsohail0008

mohammadsohail0008

42 projects • 31 followers

Comments