valve measurement board
Dependencies: mbed ads1115_test SDFileSystem
Diff: main.cpp
- Branch:
- PressureResponse
- Revision:
- 10:de2a9468b344
- Parent:
- 8:75b05055a94b
- Child:
- 11:99a4552b4fa5
diff -r 7fc83e717bc9 -r de2a9468b344 main.cpp --- a/main.cpp Thu Mar 04 23:50:30 2021 +0900 +++ b/main.cpp Fri Mar 05 00:18:51 2021 +0900 @@ -9,7 +9,7 @@ #define TEMP_LSB 0.0625f -//Serial pc(USBTX, USBRX, 115200); +Serial pc(USBTX, USBRX, 115200); // Serial wireless(p28,p27); @@ -85,7 +85,12 @@ data[0] &= 0xfffc; temp2 = (float)((int16_t)data[0]) * TEMP_LSB; - //pc.printf("%d\t%d\t%d\t%f\t%f\r\n", timer.read_ms(), press_bit1, press_bit2, temp1, temp2); + // Debug and Config section----------------------------------------------------------------- + pc.printf("%d\t%d\t%d\t%f\t%f\r\n", timer.read_ms(), press_bit1, press_bit2, temp1, temp2); + if (pc.readable() > 0){ + wireless.printf(pc.getc()); + } + // ----------------------------------------------------------------------------------------- int time = timer.read_ms(); if(time - dt >= 100){ wireless.printf("Tank Pressure is %d now.\r\n",press_bit1);