BLE switch interface with GROVE joystic for micro:bit http://mahoro-ba.net/e2073.html
Revision 17:cd518ed30bac, committed 2019-03-19
- Comitter:
- masakjm
- Date:
- Tue Mar 19 20:40:31 2019 +0000
- Parent:
- 16:1f50a27806ee
- Child:
- 18:0940af085381
- Child:
- 19:4354c463c36c
- Commit message:
- Improve stability
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Mar 19 20:03:53 2019 +0000 +++ b/main.cpp Tue Mar 19 20:40:31 2019 +0000 @@ -17,7 +17,7 @@ // G GROVE sensor connect error //--------------------------------- -#define VERSION "JOY-190317" +#define VERSION "JOY-190320" //#define NO_DEBUG #include "microbit_switch_if_joy.h" @@ -305,7 +305,7 @@ DispChar ='I'; // キーコード設定間違い } else { ble_error_t ret = kbdServicePtr->keyDownCode(key, modif); - DEBUG(" code=%d modif=%d\r\n",key , modif); +// DEBUG(" code=%d modif=%d\r\n",key , modif); if (ret) { DispChar ='E'; DispCharLast =0; // E が続く時に表示 @@ -500,7 +500,7 @@ //----- Loop State = STATE_OPERATING; while (true) { - wait(0.1); + wait(0.15); ble.waitForEvent(); // BLEイベントを待つ joyStatus = readJoyStatus(joyStatusLast); // Joystick の状態を読む