Working read code with mode button
Dependencies: SDFileSystem emic2 mbed-rtos mbed
Fork of BAT_senior_design_Testnew by
Diff: buttonArray.cpp
- Revision:
- 37:ef0921d9b5bd
- Parent:
- 36:1248dfa0740b
--- a/buttonArray.cpp Wed Nov 29 15:14:26 2017 +0000 +++ b/buttonArray.cpp Wed Nov 29 16:26:22 2017 +0000 @@ -22,7 +22,7 @@ sprintf(braille, "%d%d%d%d%d%d", test, button2.getPress(), button3.getPress(), button4.getPress(), button5.getPress(), button6.getPress());*/ //pc.printf(" %s \n", braille); - if (strcmp(braille, "000000") == 0) val = 'X'; + if (strcmp(braille, "000000") == 0) val = '@'; if (strcmp(braille, "011111") == 0) val = 'A'; if (strcmp(braille, "001111") == 0) val = 'B'; if (strcmp(braille, "011011") == 0) val = 'C'; @@ -33,8 +33,8 @@ if (strcmp(braille, "001101") == 0) val = 'H'; if (strcmp(braille, "101101") == 0) val = 'I'; if (strcmp(braille, "101001") == 0) val = 'J'; - if (strcmp(braille, "101100") == 0) val = 'M'; - if (strcmp(braille, "101010") == 0) val = 'O'; + if (strcmp(braille, "010011") == 0) val = 'M'; + if (strcmp(braille, "010101") == 0) val = 'O'; /*if (strcmp(braille, "011111") == 0) val = 'K'; if (strcmp(braille, "011111") == 0) val = 'L'; if (strcmp(braille, "011111") == 0) val = 'N'; @@ -50,7 +50,7 @@ if (strcmp(braille, "011111") == 0) val = 'Y'; if (strcmp(braille, "011111") == 0) val = 'Z';*/ // check if reset - if (strcmp(braille, "111111") == 0) val = 'Z'; + if (strcmp(braille, "111111") == 0) val = '!'; //pc.printf(" %c \n", val); return val; } @@ -95,8 +95,6 @@ // TODO check initial value of wrong int* wrong; wrong = new int[7]; - //char* inarr = getBraille(input); - //pc.printf("input %s\n", inarr); char* actarr = getBraille(actual); //pc.printf("wrong pins"); int j = 1;