![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Uses the APDS_9960 Digital Proximity, Ambient Light, RGB and Gesture Sensor library to play detected gesture sounds on a speaker from the SDcard
Dependencies: mbed SDFileSystem wave_player
Diff: glibr.cpp
- Revision:
- 15:339ffde549dc
- Parent:
- 13:5930645dc5f0
diff -r 5e5994418e97 -r 339ffde549dc glibr.cpp --- a/glibr.cpp Wed Mar 11 16:17:28 2015 +0000 +++ b/glibr.cpp Fri Mar 13 16:37:51 2015 +0000 @@ -2152,7 +2152,11 @@ if(i2c.write(address<<1, &subAddress, 1, true)){ return ERROR; //7 bit //not acked } - i2c.read(address<<1, &data, 1); + + if(i2c.read(address<<1, &data, 1)){ + return ERROR; + } + //i2c.read(address<<1, &data, 1); return data; }