CPS-Lab*
/
Lab6
Laboratory 6
Revision 4:a6069cbc4c71, committed 2018-02-23
- Comitter:
- jackclar
- Date:
- Fri Feb 23 16:48:58 2018 +0000
- Parent:
- 2:3299365b3e3c
- Commit message:
- v3
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 3299365b3e3c -r a6069cbc4c71 main.cpp --- a/main.cpp Thu Feb 22 23:17:52 2018 +0000 +++ b/main.cpp Fri Feb 23 16:48:58 2018 +0000 @@ -17,8 +17,8 @@ ADXL362.reset(); wait_ms(600); // we need to wait at least 500ms after ADXL362 reset ADXL362.set_mode(ADXL362::MEASUREMENT); - ADXL362_knock_detect(); - //ADXL362_reg_print(0, 0); + //ADXL362_knock_detect(); + ADXL362_reg_print(0, 0); } void ADXL362_knock_detect() @@ -64,7 +64,7 @@ uint8_t i; std::string name; ADXL362::ADXL362_register_t reg; - if(start >= 0x00 && start <= 0x2E && length >= 0x00 && (ADXL362.read_reg(ADXL362.DEVID_AD) == 0xAC)) + if(start >= 0x00 && start <= 0x2E && length >= 0x00 && (ADXL362.read_reg(ADXL362.DEVID_AD) == 0xAD)) { if(length == 0) {