Beunbox test code for gold SP
Dependencies: mbed ADS1015_fast KXTJ3
Revision 13:14f3b1f12aa2, committed 2019-05-21
- Comitter:
- timleferink
- Date:
- Tue May 21 14:04:56 2019 +0000
- Parent:
- 12:7ce9121c0460
- Commit message:
- updated for white
Changed in this revision
Sensorplate/main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 7ce9121c0460 -r 14f3b1f12aa2 Sensorplate/main.cpp --- a/Sensorplate/main.cpp Tue Feb 05 15:25:24 2019 +0000 +++ b/Sensorplate/main.cpp Tue May 21 14:04:56 2019 +0000 @@ -2,7 +2,7 @@ #include "Adafruit_ADS1015.h" #include "KXTJ3.h" -#define SERIAL_BAUD_RATE 115200 +#define SERIAL_BAUD_RATE 230400 #define ADC_MAX_VALUE 2048 #define DYNAMIC_SCALE 0.6f // READOUT_FREQ should work up to around 200 I think @@ -119,16 +119,12 @@ accelero.getAccAllAxis(accelerometer_data); accelerometer_zaxis=int(accelerometer_data[2]*1000); - //CHECK THIS SECTION CAREFULLY BEFORE PROGRAMMING - // gold PCB sends values in wrong order - pc.printf("%5d,%5d,%5d,%5d,", res[2], res[3], res[0], res[1]);//res[0], res[1], res[2], res[3]); - pc.printf("%5d,%5d,%5d,%5d,", res[7], res[4], res[5], res[6]);//res[4], res[5], res[6], res[7]); + pc.printf("%5d,%5d,%5d,%5d,", res[0], res[1], res[2], res[3]); + pc.printf("%5d,%5d,%5d,%5d,", res[4], res[5], res[6], res[7]); //pc.printf("%d,%d,%d,%d,", scaler_res[0], scaler_res[1], scaler_res[2], scaler_res[3]); //pc.printf("%d,%d,%d,%d,", scaler_res[4], scaler_res[5], scaler_res[6], scaler_res[7]); - pc.printf("%6d,%6d,%6d,", ele[2],ele[1],ele[0]);//ele[0],ele[1],ele[2]); - - // gold PCB: ele[3] is the reference!! - pc.printf("%6d,%6d,%6d,", ele[4],ele[3],ele[5]);//ele[3],ele[4],ele[5]); + pc.printf("%6d,%6d,%6d,", ele[0],ele[1],ele[2]); + pc.printf("%6d,%6d,%6d,", ele[3],ele[4],ele[5]); //pc.printf("%d,%d,%d,",scaler_ele[0],scaler_ele[1],scaler_ele[2]); //pc.printf("%d,%d,%d,",scaler_ele[3],scaler_ele[4],scaler_ele[5]); pc.printf("%3d,",accelerometer_zaxis);