Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:d5115a30c51d, committed 2017-04-03
- Comitter:
- u103060010
- Date:
- Mon Apr 03 16:05:25 2017 +0000
- Parent:
- 0:55184eb43f43
- Commit message:
- add some command to make code more clear
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Apr 03 15:44:37 2017 +0000 +++ b/main.cpp Mon Apr 03 16:05:25 2017 +0000 @@ -8,7 +8,7 @@ int main(void) { - + // Initialize Sensor with I2C if ( GSensor.ginit() ) { pc.printf("APDS-9960 initialization complete\r\n"); } else { @@ -26,8 +26,8 @@ while(1) { //pc.printf(".....\r\n"); - if ( GSensor.isGestureAvailable() ) { - switch ( GSensor.readGesture() ) { + if ( GSensor.isGestureAvailable() ) { // gesture detect + switch ( GSensor.readGesture() ) { // gesture differentiate case DIR_UP: pc.printf("UP\r\n"); break;