SMART BLIND STICK USING IR SENSOR

TLIOB006

One day Jugaadu saw a blind person moving with a wooden stick, its area of detection of obstacle is limited and take much time. So Jugaadu decided to make a smart stick to improve the accuracy of detection of obstacle and improve the speed of the person.
Digital Kit
  1. Place the multiple US sensors to the stick.
  2. Connect US module with Arduino, Switch, battery and buzzer using connecting wires.
  3. Program the Arduino and upload the sketch Using A to B USB Cable.
  4. Test it by power it on.

    

int trigPin1=2;

int echoPin1=3;

int trigPin2=4;

int echoPin2=5;

int buz=11;

void setup()

{

Serial.begin (9600);

pinMode(trigPin1, OUTPUT);

pinMode(echoPin1, INPUT);

pinMode(trigPin2, OUTPUT);

pinMode(echoPin2, INPUT);

pinMode(buz,OUTPUT);

digitalWrite(buz,LOW);

}

void loop() {

long duration1, distance1;

digitalWrite(trigPin1, LOW); // Added this line

delayMicroseconds(2); // Added this line

digitalWrite(trigPin1, HIGH);

delayMicroseconds(10); // Added this line

digitalWrite(trigPin1, LOW);

duration1 = pulseIn(echoPin1, HIGH);

distance1 = (duration1/2) / 29.1;

if (distance1<40){

digitalWrite(buz,HIGH);

}

else {

digitalWrite(buz,LOW);

Serial.print ( "Sensor1 ");

Serial.print ( distance1);

Serial.println("cm");

}

long duration2, distance2;

digitalWrite(trigPin2, LOW); // Added this line

delayMicroseconds(2); // Added this line

digitalWrite(trigPin2, HIGH);

delayMicroseconds(10); // Added this line

digitalWrite(trigPin2, LOW);

duration2 = pulseIn(echoPin2, HIGH);

distance2= (duration2/2) / 29.1;

if (distance2<20){

digitalWrite(buz,HIGH);

}

else {

digitalWrite(buz,LOW);

Serial.print("Sensor2 ");

Serial.print(distance2);

Serial.println("cm");

}

}