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: MMA8451Q SLCD_minus_mod mbed
Fork of ACC_LCD_341_Basic by
Revision 9:b2768bb45a68, committed 2016-11-28
- Comitter:
- dorian505
- Date:
- Mon Nov 28 02:35:44 2016 +0000
- Parent:
- 8:971f38affa78
- Child:
- 10:3de03f06624e
- Commit message:
- v
Changed in this revision
| acc_341.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/acc_341.cpp Mon Nov 28 00:23:12 2016 +0000
+++ b/acc_341.cpp Mon Nov 28 02:35:44 2016 +0000
@@ -71,16 +71,12 @@
initialize_global_vars();
// main loop forever
//Get accelerometer data - tilt angles minus offset for zero mark.
- while (true) {
+ while (true) {
if (ButtonTimer > BUTTONTIME){
buttonValue = !buttons[1].read();
for (int i=0; i < NUMBUTS; i++){ // index will be 0 or 1
if(!buttons[i]) {
-
- //xAcc = acc.getAccX();
- //yAcc = acc.getAccY();
- //zAcc = acc.getAccZ();
-
+ displayState = i;
switch (displayState){ // this keeps things generic
case xAxis:
LCDsignedFloat(xAcc);
