Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
hadi1234
Published © CC BY

Arduino Blind Stick

This smart stick can help blind people walk on the street safely without any help.

IntermediateFull instructions provided46,309
Arduino Blind Stick

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Solderless Breadboard Full Size
Solderless Breadboard Full Size
×1
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1
Buzzer
Buzzer
×1
Buzzer
Buzzer
×1
LED (generic)
LED (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Tape, Scotch
Tape, Scotch

Story

Read more

Schematics

the schematic

first the
ultrasonic sensor
2 buzzer
Led
should be attached to breadboard
then we should connect these components to arduino by wires
after that the circuit should be attached to a stick with a tape

Code

upload this code

C/C++
it is in the C/C++ language
/*
 * make a smart stick that helps the Blind
 */
 #define trigPin 9
 #define echoPin 8

 #define Buzzer1 5//active
 #define Buzzer2 7//passive
 #define Led1 6//Vibration

 
int sound = 250;


void setup() {
 Serial.begin (9600);
 pinMode(trigPin, OUTPUT);
 pinMode(echoPin, INPUT);
 pinMode(Buzzer1, OUTPUT);
 pinMode(Buzzer2, OUTPUT);
 pinMode(Led1, OUTPUT);
}

void loop() {
  Serial.begin(9600);

  long duration, distance;
  digitalWrite(trigPin, LOW);
  delay(2);
  digitalWrite(trigPin, HIGH);
  delay(10);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = (duration/2) / 29.1;
  digitalWrite(Buzzer1, LOW);
  digitalWrite(Buzzer2, LOW);
  digitalWrite(Led1, LOW);
  
  if (distance<40) {
    digitalWrite(Led1, HIGH);
    delay(2000);
  }
  if (distance<20) {
    digitalWrite(Led1, HIGH);
    delay(2000);
    digitalWrite(Buzzer1, HIGH);
    delay(2000);
  }
  if (distance<10) {
    digitalWrite(Led1, HIGH);
    delay(2000);
    digitalWrite(Buzzer1, HIGH);
    delay(2000);
    digitalWrite(Buzzer2, HIGH);
    delay(2000);
  }
  }

   

Credits

hadi1234
0 projects • 11 followers
Contact

Comments

Please log in or sign up to comment.