Use IR Gesture Click which is based on 'APDS-9960' To learn more about IR Gesture key, please refer to "https://shop.mikroe.com/click/hmi/ir-gesture"
Diff: main.cpp
- Revision:
- 1:d5115a30c51d
- Parent:
- 0:55184eb43f43
--- 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;