levi belland
Published © MIT

Giving Sight to the Blind, Visually Impaired with Particle

Giving sight to the blind, visually impaired or just to people wearing blindfolds with Particle!

BeginnerWork in progress10 hours68
Giving Sight to the Blind, Visually Impaired with Particle

Things used in this project

Hardware components

Argon
Particle Argon
×1
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1
vibration motor (generic)
×1

Software apps and online services

Particle Build Web IDE
Particle Build Web IDE
particle cli

Story

Read more

Code

thing.ino

Arduino
the main code file for the thing
/
//    usage.h/
//    Purpose: Demonstration of how to use the HC-SR04 driver
//
//    Author: Richard Nash modified by nobody5050
//    Version: 1.0.2

#include "HC-SR04.h"



// trigger / echo pins
const int triggerPin = A0;
const int echoPin = D0;
const int vibrapin = A1;
HC_SR04 rangefinder = HC_SR04(triggerPin, echoPin);

void setup()
{
    Serial.begin(9600);
    rangefinder.init();
}

void loop()
{
    unsigned long start = micros();
    float inch = rangefinder.distInch();
    unsigned long calcTime = micros() - start;
    Serial.printf("Range finding duration: %lu | Distance in inches: %.2f\n", calcTime, inch);
    delay(100);
    if (calcTime <= 45500) {
    digitalWrite(vibrapin, HIGH); 
    delay(200);
    digitalWrite(vibrapin, HIGH);
    }
}

Credits

levi belland

levi belland

1 project • 0 followers

Comments

Add projectSign up / Login