Working read code with mode button
Dependencies: SDFileSystem emic2 mbed-rtos mbed
Fork of BAT_senior_design_Testnew by
buttonArray.h@0:5887cb744114, 2017-12-04 (annotated)
- Committer:
- nnguyen45
- Date:
- Mon Dec 04 19:58:40 2017 +0000
- Revision:
- 0:5887cb744114
Working read code
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nnguyen45 | 0:5887cb744114 | 1 | #include "mbed.h" |
nnguyen45 | 0:5887cb744114 | 2 | #include "button.h" |
nnguyen45 | 0:5887cb744114 | 3 | |
nnguyen45 | 0:5887cb744114 | 4 | // This is a button class for our custom button |
nnguyen45 | 0:5887cb744114 | 5 | class buttonArray { |
nnguyen45 | 0:5887cb744114 | 6 | |
nnguyen45 | 0:5887cb744114 | 7 | // buttons |
nnguyen45 | 0:5887cb744114 | 8 | private: |
nnguyen45 | 0:5887cb744114 | 9 | // 6 buttons here |
nnguyen45 | 0:5887cb744114 | 10 | button button1; |
nnguyen45 | 0:5887cb744114 | 11 | button button2; |
nnguyen45 | 0:5887cb744114 | 12 | button button3; |
nnguyen45 | 0:5887cb744114 | 13 | button button4; |
nnguyen45 | 0:5887cb744114 | 14 | button button5; |
nnguyen45 | 0:5887cb744114 | 15 | button button6; |
nnguyen45 | 0:5887cb744114 | 16 | int currVal; |
nnguyen45 | 0:5887cb744114 | 17 | |
nnguyen45 | 0:5887cb744114 | 18 | public: |
nnguyen45 | 0:5887cb744114 | 19 | // constructors |
nnguyen45 | 0:5887cb744114 | 20 | buttonArray(); // Default |
nnguyen45 | 0:5887cb744114 | 21 | buttonArray(button button1, button button2, button button3, button button4, button button5, button button6); |
nnguyen45 | 0:5887cb744114 | 22 | // functions |
nnguyen45 | 0:5887cb744114 | 23 | int* wrongPins(char* input, char actual); |
nnguyen45 | 0:5887cb744114 | 24 | char checkVal(char* braille); // return buttons ascii representation |
nnguyen45 | 0:5887cb744114 | 25 | void releaseButtons();// release all buttons; |
nnguyen45 | 0:5887cb744114 | 26 | int* pinsUp(char val); |
nnguyen45 | 0:5887cb744114 | 27 | char* getBraille(char val); |
nnguyen45 | 0:5887cb744114 | 28 | void setup(); |
nnguyen45 | 0:5887cb744114 | 29 | }; |