Description
I made a shoe which gives tactile feedback when the user is about to run into an object. The location of the obstacle can also be detected. The shoe has two photo sensor near the tip of the shoe, one on either side. There is a motor with an unbalanced weight attached to the back of the shoe which acts like an alert.
When ever the photo sensors detect an object the motor is switched on. The user can then pull back his leg to disengage the motor. The user can check the direction of the object by moving the shoe towards the left and the right.
Case 1:
Object on the left-> Shoe will vibrate when the user moved his leg to the left.
Case 2:
Object on the right-> Shoe vibrates when the leg is on the right side.
Case 3:
Object in front-> Shoe will vibrate irrespective of the position of the leg.
Components Used:
1 arduino
2 photo sensors
1 DC motor
1 set of batteries
2 110ohm resistors
Code:
/*
the two photo sensors are used for feedback to the shoe
to help the user from running into objects
and help the blind navigate better
*/
int leftSensorPin = 0;
int rightSensorPin = 1;
int distanceMagicNumber = 250;
int motorPin = 9;
int leftVal = 0;
int rightVal = 0;
void setup()
{
Serial.begin(9600);
}
void loop()
{
leftVal = analogRead(leftSensorPin);
rightVal = analogRead(rightSensorPin);
// Serial.println(rightVal);
int motorVal = 0;
if (leftVal<distanceMagicNumber || rightVal<distanceMagicNumber)
{
motorVal = 255;
}
analogWrite(motorPin, motorVal); // analogWrite can be between 0-255
}
- Login to post comments