Fork of original senior design repo

Dependencies:   SDFileSystem mbed-rtos mbed wave_player emic2

Fork of BAT_senior_design by BAT

Committer:
aismail1997
Date:
Fri Oct 27 15:18:28 2017 +0000
Revision:
19:abbc12fca525
Parent:
18:ceac47be2e64
Child:
20:c5df903f068a
added comments

Who changed what in which revision?

UserRevisionLine numberNew contents of line
aismail1997 18:ceac47be2e64 1 #include "mbed.h"
aismail1997 18:ceac47be2e64 2 #include "buttonArray.h"
aismail1997 18:ceac47be2e64 3
aismail1997 19:abbc12fca525 4 // buttonArray constructor
aismail1997 18:ceac47be2e64 5 buttonArray::buttonArray(button b1, button b2, button b3, button b4, button b5, button b6)
aismail1997 18:ceac47be2e64 6 : button1(b1), button2(b2), button3(b3), button4(b4), button5(b5), button6(b6) {}
aismail1997 19:abbc12fca525 7
aismail1997 19:abbc12fca525 8 // FUNCTIONS
aismail1997 18:ceac47be2e64 9
aismail1997 19:abbc12fca525 10 // map input braille to ascii
aismail1997 18:ceac47be2e64 11 int buttonArray::checkVal() {
aismail1997 18:ceac47be2e64 12 char* val;
aismail1997 18:ceac47be2e64 13 sprintf(val, "%d%d%d%d%d%d", button1.getPress(), button2.getPress(),
aismail1997 18:ceac47be2e64 14 button3.getPress(), button4.getPress(), button5.getPress(), button6.getPress());
aismail1997 18:ceac47be2e64 15 if (val == "000000")
aismail1997 18:ceac47be2e64 16 return 1;
aismail1997 18:ceac47be2e64 17 else
aismail1997 18:ceac47be2e64 18 return 0;
aismail1997 18:ceac47be2e64 19 }