micro:bitにRCBControllerを接続するサンプルプログラム。 接続が不安定。micro:bitの電源入り切りやリセットSW押下を何度か試せば接続できるかも。
Fork of BLE_GATT_Example by
Revision 24:cc9bc216c814, committed 2017-10-12
- Comitter:
- robo8080
- Date:
- Thu Oct 12 06:05:04 2017 +0000
- Parent:
- 23:ceaedc4f00fe
- Commit message:
- X,Y,A,B ????????
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r ceaedc4f00fe -r cc9bc216c814 main.cpp --- a/main.cpp Wed Oct 11 12:38:27 2017 +0000 +++ b/main.cpp Thu Oct 12 06:05:04 2017 +0000 @@ -90,6 +90,18 @@ else if(controller.status.LEFT) { uBit.display.print(ARROW_W); } + else if(controller.status.X) { + uBit.display.print("X"); + } + else if(controller.status.Y) { + uBit.display.print("Y"); + } + else if(controller.status.A) { + uBit.display.print("A"); + } + else if(controller.status.B) { + uBit.display.print("B"); + } else { uBit.display.clear(); }