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: MMA8451Q8b SLCD mbed
Revision 4:ba9ca0a0f87e, committed 2015-02-09
- Comitter:
- scohennm
- Date:
- Mon Feb 09 20:05:43 2015 +0000
- Parent:
- 3:53d47a5dbb2c
- Child:
- 5:1fe35a74799a
- Commit message:
- Update for generic tap program
Changed in this revision
--- a/MMA8451Q8.lib Tue Feb 03 18:05:52 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://developer.mbed.org/users/scohennm/code/MMA8451Q8b/#993bb9e96a4b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MMA8451Q8g.lib Mon Feb 09 20:05:43 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/scohennm/code/MMA8451Q8b/#3229b6691c89
--- a/main.cpp Tue Feb 03 18:05:52 2015 +0000
+++ b/main.cpp Mon Feb 09 20:05:43 2015 +0000
@@ -1,12 +1,12 @@
#include "mbed.h"
-#include "MMA8451Q8.h"
+#include "MMA8451Q8g.h"
#include "SLCD.h"
#define BLINKTIME 0.7
#define RELAYON 0
#define RELAYOFF 1
#define LEDDELAY 0.75
-#define WAITDELAY 3.0
+#define WAITDELAY 0.7
#define LCDLEN 10
#define REG_WHO_AM_I 0x0D
@@ -106,7 +106,8 @@
sprintf (lcdData,"%x",regData);
LCDMess(lcdData,BLINKTIME);
- acc.setPulseConfiguration(latchData, axisData); // write the data
+ regData = latchData | axisData;
+ acc.setRegisterInStandby(REG_PULSE_CFG, regData); // write the data
acc.readRegs(REG_PULSE_CFG, ®Data, 1); // check it
sprintf (lcdData,"%x",regData);
LCDMess(lcdData,BLINKTIME);