SB-HW-8.1

Dependencies:   MMA8451Q8 SLCD mbed

Fork of LCD_ACC_46_v4-8g by Stanley Cohen

Files at this revision

API Documentation at this revision

Comitter:
sbart
Date:
Wed Mar 08 04:12:06 2017 +0000
Parent:
4:6128eb8206ee
Commit message:
SB-HW-8.1

Changed in this revision

MMA8451Q8.lib Show annotated file Show diff for this revision Revisions of this file
lcd_acc_46_v4-8g.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 6128eb8206ee -r 8cd5ac22a82f MMA8451Q8.lib
--- a/MMA8451Q8.lib	Wed Feb 22 15:35:58 2017 +0000
+++ b/MMA8451Q8.lib	Wed Mar 08 04:12:06 2017 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/users/scohennm/code/MMA8451Q8/#7812354ef684
+https://developer.mbed.org/users/sbart/code/MMA8451Q8/#31f7a3426768
diff -r 6128eb8206ee -r 8cd5ac22a82f lcd_acc_46_v4-8g.cpp
--- a/lcd_acc_46_v4-8g.cpp	Wed Feb 22 15:35:58 2017 +0000
+++ b/lcd_acc_46_v4-8g.cpp	Wed Mar 08 04:12:06 2017 +0000
@@ -1,5 +1,5 @@
 #include "mbed.h"
-#include "MMA8451Q8.h"
+#include "MMA8451Q8b.h"
 #include "SLCD.h"
 /* 
 Test of the accelerometer, digital I/O, on-board LCD screen, and 16-bit ADC.
@@ -34,6 +34,8 @@
 #define MAX_4G            0x01
 #define MAX_8G            0x02
 
+#define GLIMIT  8
+
 #define PROGNAME "LCD_ACC_LCDv3 46\r/n"
 
 //#define PRINTDBUG
@@ -98,7 +100,7 @@
     float DisplayTime = DATADISPDWELL;
     int outState = false;
     char lcdData[10]; //buffer needs places for decimal pt and colon
-    uint8_t regData = MAX_4G; 
+    uint8_t regData = MAX_8G; 
 
     
 #ifdef PRINTDBUG
@@ -114,7 +116,7 @@
     dataTimer.start();
     dataTimer.reset();
 // change sensititivity experimental
-    acc.setGLimit();
+    acc.setGLimit(GLIMIT);
     acc.readRegs(XYZ_DATA_CFG, &regData, 1);
     sprintf (lcdData,"%d",regData);
     LCDMess(lcdData,BLINKTIME);