Sunny
Created September 4, 2024 © CC BY

Proximity Sensed Haptic System for Visually Impaired

A wearable solution for visually impaired people which will help them avoid obstacles & navigate indoor better by receiving haptic feedback

IntermediateFull instructions provided4 hours17
Proximity Sensed Haptic System for Visually Impaired

Story

Read more

Schematics

Schematic

wiring diagram

Code

main.c

Arduino
Open in Arduino IDE
Select board as Arduino Leonardo
int i;
int val_in_cm = 100;
int sensor_pin = A2; // Analog Input for IR proximity sensor
int blue_led = 13;  // viusal indicator of vibration
int vibe_drive = 10; // UNL2803 chip drive pin to run vibration motors


void setup() 
{
 pinMode(blue_led,OUTPUT);
 pinMode(vibe_drive,OUTPUT);
}

void loop() 
{
  
  // read analog val from IR proximity sensor output
  
    i=analogRead(sensor_pin);
  
  // convert in cm distance of obstacle
    val_in_cm=(6762/(i-9))-4;
  
    
    if (val_in_cm <= 10)
    val_in_cm = 10;
    
    if (val_in_cm >= 99)
    val_in_cm = 100;
  
  // change haptic sensation based on obstacle distance
  // closer object will have stronger vibration
  
    int pwm_scaling = val_in_cm*2.55;
    analogWrite (blue_led, (255-pwm_scaling));
    analogWrite (vibe_drive, (255-pwm_scaling));
    delay (val_in_cm*3);
    analogWrite (blue_led, 0);
    analogWrite (vibe_drive, 0);
    delay (val_in_cm*3);
  
}

Credits

Sunny

Sunny

2 projects • 0 followers
It's me again !

Comments