Skip to content

Commit 21fb820

Browse files
committed
Adding debug prints to help diagnose why the sensor sometime fails to begin
Also replaced all references to 'slave' or 'slv' with 'peripheral' and 'periph'
1 parent e4f67c7 commit 21fb820

File tree

10 files changed

+367
-196
lines changed

10 files changed

+367
-196
lines changed

examples/Arduino/Example1_Basics/Example1_Basics.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ void setup() {
4242
WIRE_PORT.setClock(400000);
4343
#endif
4444

45+
//myICM.enableDebugging(); // Uncomment this line to enable helpful debug messages on Serial
46+
4547
bool initialized = false;
4648
while( !initialized ){
4749

examples/Arduino/Example2_Advanced/Example2_Advanced.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ void setup() {
4343
WIRE_PORT.setClock(400000);
4444
#endif
4545

46+
//myICM.enableDebugging(); // Uncomment this line to enable helpful debug messages on Serial
47+
4648
bool initialized = false;
4749
while( !initialized ){
4850

examples/Arduino/Example3_Interrupts/Example3_Interrupts.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ void setup() {
6161
WIRE_PORT.setClock(400000);
6262
#endif
6363

64+
//myICM.enableDebugging(); // Uncomment this line to enable helpful debug messages on Serial
65+
6466
bool initialized = false;
6567
while( !initialized ){
6668

keywords.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ ICM_20948_InternalSensorID_bm KEYWORD1
1717
#######################################
1818

1919
ICM_20948 KEYWORD2
20+
enableDebugging
21+
disableDebugging
22+
debugPrintStatus
23+
debugPrint
24+
debugPrintln
25+
doDebugPrint
2026
getAGMT KEYWORD2
2127
magX KEYWORD2
2228
magY KEYWORD2
@@ -45,8 +51,8 @@ enableDLPF KEYWORD2
4551
setSampleRate KEYWORD2
4652
i2cMasterPassthrough KEYWORD2
4753
i2cMasterEnable KEYWORD2
48-
i2cMasterConfigureSlave KEYWORD2
49-
i2cMasterSLV4Transaction KEYWORD2
54+
i2cControllerConfigurePeripheral KEYWORD2
55+
i2cControllerPeriph4Transaction KEYWORD2
5056
i2cMasterSingleW KEYWORD2
5157
i2cMasterSingleR KEYWORD2
5258
startupDefault KEYWORD2

0 commit comments

Comments
 (0)