zeze
Published © GPL3+

I. C Glasses

A pair of glasses that have a sensor, enabling blind people to feel the things around them.

IntermediateShowcase (no instructions)628
I. C Glasses

Things used in this project

Hardware components

Flora
Adafruit Flora
×1
Resistor 10k ohm
Resistor 10k ohm
×1
Photodiode
×1
Vibration Motor
×1

Story

Read more

Code

I.C.ino

Arduino
Arduino code file
int lightsensor = A11;
int vibrationmotor1 = 10;
int vibrationmotor2 = 9;
int threshold = 500;


void setup() {
  // put your setup code here, to run once:
//pinMode(lightsensor, INPUT);
pinMode(vibrationmotor1, OUTPUT);
pinMode(vibrationmotor2, OUTPUT);

Serial.begin(9600);

}

void loop() {
  // put your main code here, to run repeatedly:
  int lightvalue = analogRead(lightsensor);
  Serial.println(lightvalue);
  if (lightvalue<threshold){
    digitalWrite(vibrationmotor1, HIGH);
    digitalWrite(vibrationmotor2, HIGH);
   
  }
  else
  {  digitalWrite(vibrationmotor1, LOW);
    digitalWrite(vibrationmotor2, LOW);
  }
 
}

Credits

zeze
3 projects • 0 followers

Comments