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
Revision 15:339ffde549dc, committed 2015-03-13
- Comitter:
- kbhagat6
- Date:
- Fri Mar 13 16:37:51 2015 +0000
- Parent:
- 14:5e5994418e97
- Child:
- 16:cd5666b8fa12
- Commit message:
- final..
Changed in this revision
glibr.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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; }