diff --git a/examples/run_calibration.sh b/examples/run_calibration.sh new file mode 100755 index 0000000..fa30c67 --- /dev/null +++ b/examples/run_calibration.sh @@ -0,0 +1,19 @@ +#!/usr/bin/bash +# +# for capturing magnet readings during calibration and then +# buildling 3D model +# +CURRENT_UNIT=${CURRENT_UNIT} +LOG=~/work/tbeam/${CURRENT_UNIT}_calibration_$(date +%Y%m%d_%H%M%S).log +echo "Logging to: $LOG" + +pio run -e T_BEAM_S3_SUPREME_SX1262 -t upload --upload-port /dev/ttyt${CURRENT_UNIT} && \ +pio device monitor -b 115200 -p /dev/ttyt${CURRENT_UNIT} | \ +perl -MTime::HiRes=time -ne ' +BEGIN { $t0 = time() } +$elapsed = time() - $t0; +$mm = int($elapsed / 60); +$ss = int($elapsed % 60); +$ms = int(($elapsed - int($elapsed)) * 1000); +printf "%6d %02d:%02d.%03d %s", $. , $mm, $ss, $ms, $_; +' | tee "$LOG" diff --git a/examples/run_test_after_calibration.sh b/examples/run_test_after_calibration.sh new file mode 100755 index 0000000..5e15708 --- /dev/null +++ b/examples/run_test_after_calibration.sh @@ -0,0 +1,17 @@ +#!/usr/bin/bash +# +# for capturing magnet readings during calibration and then +# buildling 3D model +# +LOG=~/work/tbeam/ED_TEST_after_calibration_$(date +%Y%m%d_%H%M%S).log +echo "Logging to: $LOG" + +pio device monitor -b 115200 -p /dev/ttytED | \ +perl -MTime::HiRes=time -ne ' +BEGIN { $t0 = time() } +$elapsed = time() - $t0; +$mm = int($elapsed / 60); +$ss = int($elapsed % 60); +$ms = int(($elapsed - int($elapsed)) * 1000); +printf "%6d %02d:%02d.%03d %s", $. , $mm, $ss, $ms, $_; +' | tee "$LOG"