John Scharf
/
Hat_Board_v5
accel now workin
Fork of Hat_Board_Test by
Diff: SI_LIS.cpp
- Revision:
- 3:8334f137c151
- Parent:
- 2:3a8cd127b72a
- Child:
- 4:e9df42113893
--- a/SI_LIS.cpp Thu Mar 20 09:49:36 2014 +0000 +++ b/SI_LIS.cpp Fri Mar 21 01:13:05 2014 +0000 @@ -130,7 +130,10 @@ char Reg_Val; Reg_Num = 0x20; // CTRL_REG1 - Reg_Val = 0x57; // Nib 1 of 0101: Normal mode, 100 Hz; Nib 2 of 0111: Normal mode, XYZ enabled + // Nib 1 of 0101: Normal mode, 100 Hz; Nib 2 of 0111: Normal mode, XYZ enabled +// Reg_Val = 0x57; // Nib 1 of 0101: Normal mode, 100 Hz; Nib 2 of 0111: Normal mode, XYZ enabled + // Nib 1 of 0111: 400 Hz; Nib 2 of 0111: XYZ enabled + Reg_Val = 0x77; data[0] = Reg_Num; //register to be written to data[1] = Reg_Val; //data @@ -139,7 +142,9 @@ wait(0.050); // Delay needed, or 2nd write doesn't work Reg_Num = 0x21; // CTRL_REG2 - Reg_Val = 0xA0; // 7-6 10: Normal filter mode; 5-4 10: Cut off freq; 3-0 0000: bypass interrupts +// Reg_Val = 0xA0; + Reg_Val = 0xA8; // 1010_1000 + // 7-6 10: Normal filter mode; 5-4 10: Cut off freq; 3-0 0000: bypass interrupts // High-pass filter bits 5-4: @ 100 Hz: 00 - 2Hz 01 - 1Hz 10- 0.5Hz 11- 0.2Hz data[0] = Reg_Num; //register to be written to data[1] = Reg_Val; //data