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.
Dependencies: ADXL362 mbed MPL3115A2
Revision 13:1cae1960370c, committed 2018-02-22
- Comitter:
- htdoughe
- Date:
- Thu Feb 22 21:32:49 2018 +0000
- Parent:
- 12:c6b056ad171e
- Child:
- 14:0c2659ce7a8a
- Commit message:
- more documentation
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Feb 22 21:29:19 2018 +0000
+++ b/main.cpp Thu Feb 22 21:32:49 2018 +0000
@@ -151,6 +151,7 @@
x=adxl362.scanx_u8();
y=adxl362.scany_u8();
z=adxl362.scanz_u8();
+ //if x, y, or z vary from baseline by at least 3, a knock has occured.
if(x > initx+2 || y > inity+2 || z > initz+2 || x > initx-2 || y > inity-2 || z > initz-2){
led1 = 1;
wait_ms(2000);