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.
Diff: main.cpp
- Revision:
- 2:e32b4313502d
- Parent:
- 1:eccb59d79d6a
diff -r eccb59d79d6a -r e32b4313502d main.cpp
--- a/main.cpp Wed Jan 16 23:46:13 2019 +0000
+++ b/main.cpp Thu Jan 17 00:10:52 2019 +0000
@@ -17,7 +17,6 @@
int main() {
- tapI2C.frequency(2000000); // 2 MHz clock
buff[0] = 0x1D;
buff[1] = 80;
tapI2C.write(accelAddr, buff, 2);
@@ -52,8 +51,11 @@
wait(0.02);
tapInterrupt.rise(&tapsHappened);
+ tapsHappened();
while(1){
- tapsHappened();
+ pc.printf("%d\r\n", tapInterrupt.read());
+ tapsHappened();
+ wait(0.5);
}
// Holds bytes for I2C reads/writes
short rawTemp; // Holder for temperature bits
