Anda di halaman 1dari 7

APPENDIX F

GIZDUINO MICROCONTROLLER PROGRAM

#include <NewPing.h>

#define TRIGGER_PIN_leftsonar 12 // Arduino pin tied to trigger pin on the left


ultrasonic sensor.
#define ECHO_PIN_leftsonar
sensor.

11 // Arduino pin tied to echo pin on the left ultrasonic

#define MAX_DISTANCE 50
// Maximum distance we want to ping for (in
centimeters). Maximum sensor distance is rated at 400-500cm.

#define TRIGGER_PIN_rightsonar 9 // Arduino pin tied to trigger pin on the right


ultrasonic sensor.
#define ECHO_PIN_rightsonar 8 // Arduino pin tied to echo pin on the right ultrasonic
sensor.
// Maximum distance we want to ping for (in centimeters). Maximum sensor distance is
rated at 400-500cm.

NewPing sonar(TRIGGER_PIN_leftsonar, ECHO_PIN_leftsonar, MAX_DISTANCE);


NewPing sonar2(TRIGGER_PIN_rightsonar, ECHO_PIN_rightsonar,
MAX_DISTANCE); // NewPing setup of pins and maximum distance for both sonars.

int PLAY_button=3;

//Plays the 25seconds ISD2560 chip

int RESET_button=4; // Reset the 25seconds ISD2560 chip

int BIT_0=7;

//Orange wire connected from the audio circuit

int BIT_1=6;

void setup() {
Serial.begin(9600); // Open serial monitor at 115200 baud to see ping results.

pinMode(BIT_0,OUTPUT);
pinMode(BIT_1,OUTPUT);
digitalWrite(BIT_0,HIGH);
digitalWrite(BIT_1,HIGH);
pinMode(PLAY_button,INPUT);
circuit

//RED WIRE on the 4 pin output from the audio

pinMode(RESET_button,INPUT);
audio circuit

//BLACK WIRE on the 4 pin output from the

void loop() {
{ delay(50);
// Wait 50ms between pings (about 20 pings/sec). 29ms
should be the shortest delay between pings.
unsigned int uS = sonar.ping(); // Send ping, get ping time in microseconds (uS).
int MEASURED_OBSTRUCTION_LEFTSONAR=uS/ US_ROUNDTRIP_CM; //
Computation for the

delay(50);
// Wait 50ms between pings (about 20 pings/sec). 29ms should
be the shortest delay between pings.
unsigned int uS2 = sonar2.ping(); // Send ping, get ping time in microseconds (uS).
int MEASURED_OBSTRUCTION_RIGHTSONAR=uS2/ US_ROUNDTRIP_CM;

if
((MEASURED_OBSTRUCTION_LEFTSONAR>0)&&(MEASURED_OBSTRUCTIO
N_RIGHTSONAR>0))
{
digitalWrite(BIT_0,HIGH);
digitalWrite(BIT_1,HIGH);

digitalWrite(PLAY_button,HIGH);
delay(800);
digitalWrite(PLAY_button,LOW);
delay(100);

digitalWrite(RESET_button,HIGH);
delay(800);
digitalWrite(RESET_button,LOW);
delay(100);

//move right
if
((MEASURED_OBSTRUCTION_LEFTSONAR>0)&&(MEASURED_OBSTRUCTIO
N_RIGHTSONAR==0))

{
digitalWrite(BIT_0,LOW);
digitalWrite(BIT_1,HIGH);

digitalWrite(PLAY_button,HIGH);
delay(800);
digitalWrite(PLAY_button,LOW);
delay(100);

digitalWrite(RESET_button,HIGH);
delay(500);
digitalWrite(RESET_button,LOW);
delay(100);
}

//move left
if
((MEASURED_OBSTRUCTION_RIGHTSONAR>0)&&(MEASURED_OBSTRUCTI
ON_LEFTSONAR==0))
{
digitalWrite(BIT_0,HIGH);
digitalWrite(BIT_1,LOW);

digitalWrite(PLAY_button,HIGH);
delay(800);
digitalWrite(PLAY_button,LOW);
delay(100);

digitalWrite(RESET_button,HIGH);
delay(500);
digitalWrite(RESET_button,LOW);
delay(100);

Serial.print("Ping: ");
Serial.print(MEASURED_OBSTRUCTION_LEFTSONAR); // Convert ping time to
distance in cm and print result (0 = outside set distance range)
Serial.println("cm");
Serial.print("Ping2: ");
Serial.print(MEASURED_OBSTRUCTION_RIGHTSONAR); // Convert ping time to
distance in cm and print result (0 = outside set distance range)
Serial.println("cm");}

APPENDIX G
PAMANTASAN NG LUNGSOD NG MAYNILA
(University of the City of Manila)
Intramuros, Manila

COLLEGE OF ENGINEERING AND TECHNOLOGY

Obstacle Detector Microcontroller Based Belt via Ultrasonic Sensors With Voice Command
For Level Surface Indoor Direction Instruction
For Legally Blind People

QUESTIONNAIRE

Name (Optional) : _________________________________________________ Year/Block:


______________________
Age: ___________
_________________________

Gender:

1. Passing through the set-up maze while wearing a blind fold mask, does the device help
you make it
through?________________________________________________________________

________________________________________________________________________
________________________
________________________________________________________________________
____________
2. How do you feel using the device to navigate inside the maze? Is it easy or hard?
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
____________________________________

3. Having experience in using the device, do you think it will help the blind people to
navigate?
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
____________________________________

4. Give atleast two advantages and disadvantages of the navigational belt.


________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
____________________________________________________________

5. Any suggestions for future improvements?


_________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________
________________________________________________________________________
____________

Anda mungkin juga menyukai