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.
Fork of ADXL362 by
Revision 2:e484040b8f84, committed 2018-09-20
- Comitter:
- jmhong
- Date:
- Thu Sep 20 06:34:12 2018 +0000
- Parent:
- 1:bf56b783747e
- Commit message:
- bug fix
Changed in this revision
| ADXL362.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/ADXL362.cpp Fri Jun 22 03:41:47 2018 +0000
+++ b/ADXL362.cpp Thu Sep 20 06:34:12 2018 +0000
@@ -34,7 +34,8 @@
///////////////////////////////////////////////////////////////////////////////////////
reg = ACC_ReadReg(FILTER_CTL);
- printf("1 ------------------Start : FILTER_CTL = 0x%X\r\n\n", reg);
+ printf("[Vibration] Init start");
+// printf("1 ------------------Start : FILTER_CTL = 0x%X\r\n\n", reg);
// printf("2 ------------------Input : FILTER_CTL = 0x17\r\n");
@@ -52,11 +53,11 @@
//pc.printf("FIFO_SAM = 0x%X\r\n", reg);
- printf("2 ------------------Connect accelerometer");
+// printf("2 ------------------Connect accelerometer");
while(reg != 0x17)
{
- printf(" vib while...\n");
+// printf(" vib while...\n");
// set adxl362 to 4g range, 25Hz
//ACC_WriteReg(FILTER_CTL,0x51);
@@ -69,7 +70,7 @@
if(reg == 0x17)
{
- printf(" Success!!\n\n");
+// printf(" Success!!\n\n");
// printf("2 ------------------Output : FILTER_CTL = 0x%X\r\n\n\n", reg);
}
else
@@ -89,6 +90,7 @@
ACC_WriteReg(POWER_CTL,0x22);
//reg = ACC_ReadReg(POWER_CTL);
//pc.printf("POWER_CTL = 0x%X\r\n", reg);
+ printf("(OK)\n");
}
void ADXL362::ACC_GetXYZ16(int16_t* x16, int16_t* y16, int16_t* z16)
