From 7c30ba1ebe49a528fdf31629b7041b958e9c7bb0 Mon Sep 17 00:00:00 2001 From: Eric Yu Date: Sun, 15 May 2022 12:48:22 -0700 Subject: [PATCH] Upload files --- .idea/.gitignore | 8 + .idea/.name | 1 + .idea/encodings.xml | 6 + .idea/inspectionProfiles/Project_Default.xml | 12 + .idea/misc.xml | 6 + .idea/modules.xml | 8 + ReadAnalog/.gitignore | 5 + .../.history/getPlatformio_20220326200316.py | 26 + .../.history/getPlatformio_20220514231848.py | 26 + .../.history/getPlatformio_20220514231927.py | 27 + .../.history/getPlatformio_20220514231936.py | 27 + .../.history/src/main_20220512085328.cpp | 9 + .../.history/src/main_20220512085541.cpp | 10 + .../.history/src/main_20220512085544.cpp | 10 + .../.history/src/main_20220512085545.cpp | 10 + .../.history/src/main_20220512085553.cpp | 10 + .../.history/src/main_20220512085557.cpp | 10 + .../.history/src/main_20220512085558.cpp | 10 + .../.history/src/main_20220512085630.cpp | 10 + .../.history/src/main_20220512085631.cpp | 10 + .../.history/src/main_20220512085634.cpp | 10 + .../.history/src/main_20220512085641.cpp | 11 + .../.history/src/main_20220512085645.cpp | 11 + .../.history/src/main_20220512085647.cpp | 11 + .../.history/src/main_20220512085651.cpp | 11 + .../.history/src/main_20220512085653.cpp | 11 + .../.history/src/main_20220512085656.cpp | 11 + .../.history/src/main_20220512085657.cpp | 11 + .../.history/src/main_20220512085707.cpp | 11 + .../.history/src/main_20220512085709.cpp | 11 + .../.history/src/main_20220512085713.cpp | 12 + .../.history/src/main_20220512085715.cpp | 12 + .../.history/src/main_20220512085721.cpp | 14 + .../.history/src/main_20220512085726.cpp | 14 + .../.history/src/main_20220512085728.cpp | 14 + .../.history/src/main_20220512085730.cpp | 14 + .../.history/src/main_20220512085732.cpp | 14 + .../.history/src/main_20220512085735.cpp | 14 + .../.history/src/main_20220512085741.cpp | 15 + .../.history/src/main_20220512085747.cpp | 15 + .../.history/src/main_20220512085750.cpp | 15 + .../.history/src/main_20220512085755.cpp | 15 + .../.history/src/main_20220512085759.cpp | 15 + .../.history/src/main_20220512085802.cpp | 15 + .../.history/src/main_20220512085803.cpp | 15 + .../.history/src/main_20220512085808.cpp | 15 + .../.history/src/main_20220512085810.cpp | 15 + .../.history/src/main_20220512085812.cpp | 15 + .../.history/src/main_20220512085816.cpp | 15 + .../.history/src/main_20220512085821.cpp | 17 + .../.history/src/main_20220512085834.cpp | 15 + .../.history/src/main_20220512085840.cpp | 15 + .../.history/src/main_20220512085841.cpp | 15 + .../.history/src/main_20220512085849.cpp | 15 + .../.history/src/main_20220512085851.cpp | 15 + .../.history/src/main_20220512085852.cpp | 15 + .../.history/src/main_20220512085900.cpp | 15 + .../.history/src/main_20220512085902.cpp | 15 + .../.history/src/main_20220512085904.cpp | 15 + .../.history/src/main_20220512085908.cpp | 15 + .../.history/src/main_20220512085912.cpp | 15 + .../.history/src/main_20220512085915.cpp | 15 + .../.history/src/main_20220512085917.cpp | 15 + .../.history/src/main_20220512085920.cpp | 15 + .../.history/src/main_20220512085923.cpp | 17 + .../.history/src/main_20220512085929.cpp | 17 + .../.history/src/main_20220512085930.cpp | 17 + .../.history/src/main_20220512085933.cpp | 17 + .../.history/src/main_20220512085935.cpp | 17 + .../.history/src/main_20220512085943.cpp | 17 + .../.history/src/main_20220512085944.cpp | 17 + .../.history/src/main_20220512085947.cpp | 17 + .../.history/src/main_20220512085949.cpp | 17 + .../.history/src/main_20220512085953.cpp | 17 + .../.history/src/main_20220512085959.cpp | 18 + .../.history/src/main_20220512090002.cpp | 18 + .../.history/src/main_20220512090004.cpp | 18 + .../.history/src/main_20220512090006.cpp | 18 + .../.history/src/main_20220512090025.cpp | 18 + .../.history/src/main_20220512090028.cpp | 19 + .../.history/src/main_20220512090032.cpp | 19 + .../.history/src/main_20220512090038.cpp | 19 + .../.history/src/main_20220512090040.cpp | 19 + .../.history/src/main_20220512090047.cpp | 19 + .../.history/src/main_20220512090052.cpp | 19 + .../.history/src/main_20220512090055.cpp | 19 + .../.history/src/main_20220512090059.cpp | 19 + .../.history/src/main_20220512090100.cpp | 19 + .../.history/src/main_20220512090103.cpp | 19 + .../.history/src/main_20220512090107.cpp | 21 + .../.history/src/main_20220512090110.cpp | 21 + .../.history/src/main_20220512090114.cpp | 22 + .../.history/src/main_20220512090117.cpp | 22 + .../.history/src/main_20220512090119.cpp | 22 + .../.history/src/main_20220512090122.cpp | 22 + .../.history/src/main_20220512090127.cpp | 23 + .../.history/src/main_20220512090128.cpp | 23 + .../.history/src/main_20220512090132.cpp | 23 + .../.history/src/main_20220512090138.cpp | 23 + .../.history/src/main_20220512090139.cpp | 23 + .../.history/src/main_20220512090145.cpp | 23 + .../.history/src/main_20220512090146.cpp | 23 + .../.history/src/main_20220512090156.cpp | 24 + .../.history/src/main_20220512090158.cpp | 24 + .../.history/src/main_20220512090200.cpp | 24 + .../.history/src/main_20220512090202.cpp | 24 + .../.history/src/main_20220512090203.cpp | 24 + .../.history/src/main_20220512090204.cpp | 24 + .../.history/src/main_20220512090209.cpp | 24 + .../.history/src/main_20220512090353.cpp | 23 + .../.history/src/main_20220512090356.cpp | 22 + .../.history/src/main_20220512090358.cpp | 22 + .../.history/src/main_20220512090400.cpp | 22 + .../.history/src/main_20220512090405.cpp | 22 + .../.history/src/main_20220512090412.cpp | 22 + .../.history/src/main_20220512090435.cpp | 22 + .../.history/src/main_20220512090441.cpp | 22 + .../.history/src/main_20220512090442.cpp | 22 + .../.history/src/main_20220512090445.cpp | 22 + .../.history/src/main_20220512090502.cpp | 24 + .../.history/src/main_20220512090505.cpp | 24 + .../.history/src/main_20220512090506.cpp | 24 + .../.history/src/main_20220512090510.cpp | 24 + .../.history/src/main_20220512090512.cpp | 24 + .../.history/src/main_20220512090514.cpp | 24 + .../.history/src/main_20220512090523.cpp | 24 + .../.history/src/main_20220512090524.cpp | 24 + .../.history/src/main_20220512090526.cpp | 24 + .../.history/src/main_20220512090529.cpp | 26 + .../.history/src/main_20220512090531.cpp | 26 + .../.history/src/main_20220512090534.cpp | 26 + .../.history/src/main_20220512090535.cpp | 26 + .../.history/src/main_20220512090539.cpp | 26 + .../.history/src/main_20220512090540.cpp | 26 + .../.history/src/main_20220512090547.cpp | 27 + .../.history/src/main_20220512090549.cpp | 27 + .../.history/src/main_20220512090552.cpp | 27 + .../.history/src/main_20220512090554.cpp | 27 + .../.history/src/main_20220512090558.cpp | 28 + .../.history/src/main_20220512090610.cpp | 28 + .../.history/src/main_20220512090617.cpp | 27 + .../.history/src/main_20220512090623.cpp | 22 + .../.history/src/main_20220512090625.cpp | 22 + .../.history/src/main_20220512090629.cpp | 22 + .../.history/src/main_20220512090632.cpp | 22 + .../.history/src/main_20220512090635.cpp | 22 + .../.history/src/main_20220512090638.cpp | 22 + .../.history/src/main_20220512090644.cpp | 22 + .../.history/src/main_20220512090646.cpp | 22 + .../.history/src/main_20220512090647.cpp | 22 + .../.history/src/main_20220512090649.cpp | 24 + .../.history/src/main_20220512090652.cpp | 24 + .../.history/src/main_20220512090656.cpp | 24 + .../.history/src/main_20220512090702.cpp | 25 + .../.history/src/main_20220512090705.cpp | 25 + .../.history/src/main_20220512090708.cpp | 25 + .../.history/src/main_20220512090710.cpp | 25 + .../.history/src/main_20220512090714.cpp | 25 + .../.history/src/main_20220512090731.cpp | 26 + .../.history/src/main_20220512090736.cpp | 26 + .../.history/src/main_20220512090737.cpp | 26 + .../.history/src/main_20220512090741.cpp | 26 + .../.history/src/main_20220512090746.cpp | 27 + .../.history/src/main_20220512090747.cpp | 27 + .../.history/src/main_20220512090749.cpp | 27 + .../.history/src/main_20220512090751.cpp | 27 + .../.history/src/main_20220512090753.cpp | 27 + .../.history/src/main_20220512090831.cpp | 27 + .../.history/src/main_20220512090834.cpp | 27 + .../.history/src/main_20220512090841.cpp | 27 + .../.history/src/main_20220512090843.cpp | 27 + .../.history/src/main_20220512091049.cpp | 27 + .../.history/src/main_20220512091052.cpp | 27 + .../.history/src/main_20220512091124.cpp | 27 + .../.history/src/main_20220512091126.cpp | 27 + .../.history/src/main_20220512091207.cpp | 27 + .../.history/src/main_20220512091214.cpp | 28 + .../.history/src/main_20220512091215.cpp | 28 + .../.history/src/main_20220512091216.cpp | 28 + .../.history/src/main_20220512091426.cpp | 28 + .../.history/src/main_20220512091429.cpp | 28 + .../.history/src/main_20220514234928.cpp | 28 + .../.history/src/main_20220514234931.cpp | 28 + .../.history/src/main_20220514234942.cpp | 28 + .../.history/src/main_20220514234953.cpp | 27 + .../.history/src/main_20220514235143.cpp | 28 + .../.history/src/main_20220514235212.cpp | 28 + ReadAnalog/.vscode/extensions.json | 10 + ReadAnalog/flash.py | 27 + ReadAnalog/include/README | 39 + ReadAnalog/lib/README | 46 + ReadAnalog/platformio.ini | 14 + ReadAnalog/src/main.cpp | 28 + ReadAnalog/test/README | 11 + ReadRaw/ReadRaw.ino | 26 + SeeDatResistance.iml | 9 + gen_settings.py | 3 + read_arduino.pyw | 49 + sealammonia.fbp | 2050 +++++++++++++++++ serial_plot.pyw | 69 + test.py | 131 ++ toplevel.py | 183 ++ ui.py | 156 ++ writerandomvalues.py | 14 + 204 files changed, 6592 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/.name create mode 100644 .idea/encodings.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 ReadAnalog/.gitignore create mode 100644 ReadAnalog/.history/getPlatformio_20220326200316.py create mode 100644 ReadAnalog/.history/getPlatformio_20220514231848.py create mode 100644 ReadAnalog/.history/getPlatformio_20220514231927.py create mode 100644 ReadAnalog/.history/getPlatformio_20220514231936.py create mode 100644 ReadAnalog/.history/src/main_20220512085328.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085541.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085544.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085545.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085553.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085557.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085558.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085630.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085631.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085634.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085641.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085645.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085647.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085651.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085653.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085656.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085657.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085707.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085709.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085713.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085715.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085721.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085726.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085728.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085730.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085732.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085735.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085741.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085747.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085750.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085755.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085759.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085802.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085803.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085808.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085810.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085812.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085816.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085821.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085834.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085840.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085841.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085849.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085851.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085852.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085900.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085902.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085904.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085908.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085912.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085915.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085917.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085920.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085923.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085929.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085930.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085933.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085935.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085943.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085944.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085947.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085949.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085953.cpp create mode 100644 ReadAnalog/.history/src/main_20220512085959.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090002.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090004.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090006.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090025.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090028.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090032.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090038.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090040.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090047.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090052.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090055.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090059.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090100.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090103.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090107.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090110.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090114.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090117.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090119.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090122.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090127.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090128.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090132.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090138.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090139.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090145.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090146.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090156.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090158.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090200.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090202.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090203.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090204.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090209.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090353.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090356.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090358.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090400.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090405.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090412.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090435.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090441.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090442.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090445.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090502.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090505.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090506.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090510.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090512.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090514.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090523.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090524.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090526.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090529.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090531.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090534.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090535.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090539.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090540.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090547.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090549.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090552.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090554.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090558.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090610.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090617.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090623.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090625.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090629.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090632.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090635.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090638.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090644.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090646.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090647.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090649.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090652.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090656.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090702.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090705.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090708.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090710.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090714.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090731.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090736.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090737.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090741.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090746.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090747.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090749.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090751.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090753.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090831.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090834.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090841.cpp create mode 100644 ReadAnalog/.history/src/main_20220512090843.cpp create mode 100644 ReadAnalog/.history/src/main_20220512091049.cpp create mode 100644 ReadAnalog/.history/src/main_20220512091052.cpp create mode 100644 ReadAnalog/.history/src/main_20220512091124.cpp create mode 100644 ReadAnalog/.history/src/main_20220512091126.cpp create mode 100644 ReadAnalog/.history/src/main_20220512091207.cpp create mode 100644 ReadAnalog/.history/src/main_20220512091214.cpp create mode 100644 ReadAnalog/.history/src/main_20220512091215.cpp create mode 100644 ReadAnalog/.history/src/main_20220512091216.cpp create mode 100644 ReadAnalog/.history/src/main_20220512091426.cpp create mode 100644 ReadAnalog/.history/src/main_20220512091429.cpp create mode 100644 ReadAnalog/.history/src/main_20220514234928.cpp create mode 100644 ReadAnalog/.history/src/main_20220514234931.cpp create mode 100644 ReadAnalog/.history/src/main_20220514234942.cpp create mode 100644 ReadAnalog/.history/src/main_20220514234953.cpp create mode 100644 ReadAnalog/.history/src/main_20220514235143.cpp create mode 100644 ReadAnalog/.history/src/main_20220514235212.cpp create mode 100644 ReadAnalog/.vscode/extensions.json create mode 100644 ReadAnalog/flash.py create mode 100644 ReadAnalog/include/README create mode 100644 ReadAnalog/lib/README create mode 100644 ReadAnalog/platformio.ini create mode 100644 ReadAnalog/src/main.cpp create mode 100644 ReadAnalog/test/README create mode 100644 ReadRaw/ReadRaw.ino create mode 100644 SeeDatResistance.iml create mode 100644 gen_settings.py create mode 100644 read_arduino.pyw create mode 100644 sealammonia.fbp create mode 100644 serial_plot.pyw create mode 100644 test.py create mode 100644 toplevel.py create mode 100644 ui.py create mode 100644 writerandomvalues.py diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..73f69e0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..de3e67e --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +SeeDatResistance \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..961c692 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..3dce9c6 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,12 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..de3fcfe --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..8b8c221 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ReadAnalog/.gitignore b/ReadAnalog/.gitignore new file mode 100644 index 0000000..89cc49c --- /dev/null +++ b/ReadAnalog/.gitignore @@ -0,0 +1,5 @@ +.pio +.vscode/.browse.c_cpp.db* +.vscode/c_cpp_properties.json +.vscode/launch.json +.vscode/ipch diff --git a/ReadAnalog/.history/getPlatformio_20220326200316.py b/ReadAnalog/.history/getPlatformio_20220326200316.py new file mode 100644 index 0000000..4e67fb4 --- /dev/null +++ b/ReadAnalog/.history/getPlatformio_20220326200316.py @@ -0,0 +1,26 @@ +# Run this first if running everything in non-VSCode ide +import os + +option = "build" # build, upload, clean, or read + +if os.name == 'nt': + platformio = os.path.join(os.path.expanduser('~'), '.platformio', 'penv', 'Scripts', 'platformio.exe') +else: + platformio = os.path.join(os.path.expanduser('~'), '.platformio', 'penv', 'bin', 'platformio') +if not os.path.exists(platformio): + import requests, base64 + s = requests.Session() + s.trust_env = None # for anyone running on proxy + r = s.get('https://api.github.com/repos/platformio/platformio-core-installer/contents/get-platformio.py?ref=develop').json() + exec(base64.b64decode(r['content'])) + + +params = { + 'build': 'run', + 'upload': 'run --target upload', + 'clean': 'run --target clean', + 'read': 'device monitor' +} + + +os.system(f'{platformio} {params[option]}') # put one of the three function from above diff --git a/ReadAnalog/.history/getPlatformio_20220514231848.py b/ReadAnalog/.history/getPlatformio_20220514231848.py new file mode 100644 index 0000000..b9bcb76 --- /dev/null +++ b/ReadAnalog/.history/getPlatformio_20220514231848.py @@ -0,0 +1,26 @@ +# Run this first if running everything in non-VSCode ide +import os + +option = "upload" # build, upload, clean, or read + +if os.name == 'nt': + platformio = os.path.join(os.path.expanduser('~'), '.platformio', 'penv', 'Scripts', 'platformio.exe') +else: + platformio = os.path.join(os.path.expanduser('~'), '.platformio', 'penv', 'bin', 'platformio') +if not os.path.exists(platformio): + import requests, base64 + s = requests.Session() + s.trust_env = None # for anyone running on proxy + r = s.get('https://api.github.com/repos/platformio/platformio-core-installer/contents/get-platformio.py?ref=develop').json() + exec(base64.b64decode(r['content'])) + + +params = { + 'build': 'run', + 'upload': 'run --target upload', + 'clean': 'run --target clean', + 'read': 'device monitor' +} + + +os.system(f'{platformio} {params[option]}') # put one of the three function from above diff --git a/ReadAnalog/.history/getPlatformio_20220514231927.py b/ReadAnalog/.history/getPlatformio_20220514231927.py new file mode 100644 index 0000000..44a4b46 --- /dev/null +++ b/ReadAnalog/.history/getPlatformio_20220514231927.py @@ -0,0 +1,27 @@ +# Run this first if running everything in non-VSCode ide +import os + +option = "upload" # build, upload, clean, or read + +if os.name == 'nt': + platformio = os.path.join(os.path.expanduser('~'), '.platformio', 'penv', 'Scripts', 'platformio.exe') +else: + platformio = os.path.join(os.path.expanduser('~'), '.platformio', 'penv', 'bin', 'platformio') +if not os.path.exists(platformio): + # Platformio not exist, + import requests, base64 + s = requests.Session() + s.trust_env = None # for anyone running on proxy + r = s.get('https://api.github.com/repos/platformio/platformio-core-installer/contents/get-platformio.py?ref=develop').json() + exec(base64.b64decode(r['content'])) + + +params = { + 'build': 'run', + 'upload': 'run --target upload', + 'clean': 'run --target clean', + 'read': 'device monitor' +} + + +os.system(f'{platformio} {params[option]}') # put one of the three function from above diff --git a/ReadAnalog/.history/getPlatformio_20220514231936.py b/ReadAnalog/.history/getPlatformio_20220514231936.py new file mode 100644 index 0000000..a0aa1ed --- /dev/null +++ b/ReadAnalog/.history/getPlatformio_20220514231936.py @@ -0,0 +1,27 @@ +# Run this first if running everything in non-VSCode ide +import os + +option = "upload" # build, upload, clean, or read + +if os.name == 'nt': + platformio = os.path.join(os.path.expanduser('~'), '.platformio', 'penv', 'Scripts', 'platformio.exe') +else: + platformio = os.path.join(os.path.expanduser('~'), '.platformio', 'penv', 'bin', 'platformio') +if not os.path.exists(platformio): + # Platformio not exist, run setup from web + import requests, base64 + s = requests.Session() + s.trust_env = None # for anyone running on proxy + r = s.get('https://api.github.com/repos/platformio/platformio-core-installer/contents/get-platformio.py?ref=develop').json() + exec(base64.b64decode(r['content'])) + + +params = { + 'build': 'run', + 'upload': 'run --target upload', + 'clean': 'run --target clean', + 'read': 'device monitor' +} + + +os.system(f'{platformio} {params[option]}') # put one of the three function from above diff --git a/ReadAnalog/.history/src/main_20220512085328.cpp b/ReadAnalog/.history/src/main_20220512085328.cpp new file mode 100644 index 0000000..58b344c --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085328.cpp @@ -0,0 +1,9 @@ +#include + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085541.cpp b/ReadAnalog/.history/src/main_20220512085541.cpp new file mode 100644 index 0000000..4a0c547 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085541.cpp @@ -0,0 +1,10 @@ +#include + + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085544.cpp b/ReadAnalog/.history/src/main_20220512085544.cpp new file mode 100644 index 0000000..48172a0 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085544.cpp @@ -0,0 +1,10 @@ +#include +int pins + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085545.cpp b/ReadAnalog/.history/src/main_20220512085545.cpp new file mode 100644 index 0000000..9b05e4f --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085545.cpp @@ -0,0 +1,10 @@ +#include +int pins[] + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085553.cpp b/ReadAnalog/.history/src/main_20220512085553.cpp new file mode 100644 index 0000000..de9941e --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085553.cpp @@ -0,0 +1,10 @@ +#include +int pins[] = {} + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085557.cpp b/ReadAnalog/.history/src/main_20220512085557.cpp new file mode 100644 index 0000000..b1df13a --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085557.cpp @@ -0,0 +1,10 @@ +#include +int pins[] = {A0, A1, A2} + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085558.cpp b/ReadAnalog/.history/src/main_20220512085558.cpp new file mode 100644 index 0000000..7c843d6 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085558.cpp @@ -0,0 +1,10 @@ +#include +int pins[] = {A0, A1, A2, A3, A4} + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085630.cpp b/ReadAnalog/.history/src/main_20220512085630.cpp new file mode 100644 index 0000000..2956680 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085630.cpp @@ -0,0 +1,10 @@ +#include +int pins[] = {A0, A1, A2, A3, A4, A} + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085631.cpp b/ReadAnalog/.history/src/main_20220512085631.cpp new file mode 100644 index 0000000..a423906 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085631.cpp @@ -0,0 +1,10 @@ +#include +int pins[] = {A0, A1, A2, A3, A4, A5} + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085634.cpp b/ReadAnalog/.history/src/main_20220512085634.cpp new file mode 100644 index 0000000..ab43bf9 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085634.cpp @@ -0,0 +1,10 @@ +#include +int pins[] = {A0, A1, A2, A3, A4, A5}; + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085641.cpp b/ReadAnalog/.history/src/main_20220512085641.cpp new file mode 100644 index 0000000..3b4cfe6 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085641.cpp @@ -0,0 +1,11 @@ +#include +int pins[] = {A0, A1, A2, A3, A4, A5}; +int + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085645.cpp b/ReadAnalog/.history/src/main_20220512085645.cpp new file mode 100644 index 0000000..fa603a3 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085645.cpp @@ -0,0 +1,11 @@ +#include +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085647.cpp b/ReadAnalog/.history/src/main_20220512085647.cpp new file mode 100644 index 0000000..9b1160e --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085647.cpp @@ -0,0 +1,11 @@ +#include +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[] + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085651.cpp b/ReadAnalog/.history/src/main_20220512085651.cpp new file mode 100644 index 0000000..309187c --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085651.cpp @@ -0,0 +1,11 @@ +#include +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof] + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085653.cpp b/ReadAnalog/.history/src/main_20220512085653.cpp new file mode 100644 index 0000000..29a845d --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085653.cpp @@ -0,0 +1,11 @@ +#include +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)] + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085656.cpp b/ReadAnalog/.history/src/main_20220512085656.cpp new file mode 100644 index 0000000..5132413 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085656.cpp @@ -0,0 +1,11 @@ +#include +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2] + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085657.cpp b/ReadAnalog/.history/src/main_20220512085657.cpp new file mode 100644 index 0000000..bcdb079 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085657.cpp @@ -0,0 +1,11 @@ +#include +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; + +void setup() { + // put your setup code here, to run once: +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085707.cpp b/ReadAnalog/.history/src/main_20220512085707.cpp new file mode 100644 index 0000000..8ed37f6 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085707.cpp @@ -0,0 +1,11 @@ +#include +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; + +void setup() { + for +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085709.cpp b/ReadAnalog/.history/src/main_20220512085709.cpp new file mode 100644 index 0000000..f627675 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085709.cpp @@ -0,0 +1,11 @@ +#include +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; + +void setup() { + +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085713.cpp b/ReadAnalog/.history/src/main_20220512085713.cpp new file mode 100644 index 0000000..5039fbc --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085713.cpp @@ -0,0 +1,12 @@ +#include +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j + +void setup() { + +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085715.cpp b/ReadAnalog/.history/src/main_20220512085715.cpp new file mode 100644 index 0000000..af97dd6 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085715.cpp @@ -0,0 +1,12 @@ +#include +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; + +void setup() { + +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085721.cpp b/ReadAnalog/.history/src/main_20220512085721.cpp new file mode 100644 index 0000000..1de95f4 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085721.cpp @@ -0,0 +1,14 @@ +#include + + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; + +void setup() { + +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085726.cpp b/ReadAnalog/.history/src/main_20220512085726.cpp new file mode 100644 index 0000000..0142d97 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085726.cpp @@ -0,0 +1,14 @@ +#include +#define + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; + +void setup() { + +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085728.cpp b/ReadAnalog/.history/src/main_20220512085728.cpp new file mode 100644 index 0000000..2094ca6 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085728.cpp @@ -0,0 +1,14 @@ +#include +#define WAIT + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; + +void setup() { + +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085730.cpp b/ReadAnalog/.history/src/main_20220512085730.cpp new file mode 100644 index 0000000..0c3f0fb --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085730.cpp @@ -0,0 +1,14 @@ +#include +#define WAIT_TIME + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; + +void setup() { + +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085732.cpp b/ReadAnalog/.history/src/main_20220512085732.cpp new file mode 100644 index 0000000..2ed48ad --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085732.cpp @@ -0,0 +1,14 @@ +#include +#define WAIT_TIME + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; + +void setup() { + +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085735.cpp b/ReadAnalog/.history/src/main_20220512085735.cpp new file mode 100644 index 0000000..04153b1 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085735.cpp @@ -0,0 +1,14 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; + +void setup() { + +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085741.cpp b/ReadAnalog/.history/src/main_20220512085741.cpp new file mode 100644 index 0000000..a568d76 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085741.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int curr + +void setup() { + +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085747.cpp b/ReadAnalog/.history/src/main_20220512085747.cpp new file mode 100644 index 0000000..e2daf10 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085747.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime = millis() + +void setup() { + +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085750.cpp b/ReadAnalog/.history/src/main_20220512085750.cpp new file mode 100644 index 0000000..e3e4238 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085750.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime = millis(); // non + +void setup() { + +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085755.cpp b/ReadAnalog/.history/src/main_20220512085755.cpp new file mode 100644 index 0000000..d51e428 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085755.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime = millis(); // non-blocking timer + +void setup() { + +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085759.cpp b/ReadAnalog/.history/src/main_20220512085759.cpp new file mode 100644 index 0000000..ae7e4e3 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085759.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime = millis(); // non-blocking timer + +void setup() { + for (i) +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085802.cpp b/ReadAnalog/.history/src/main_20220512085802.cpp new file mode 100644 index 0000000..62162a3 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085802.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime = millis(); // non-blocking timer + +void setup() { + for (i = 0) +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085803.cpp b/ReadAnalog/.history/src/main_20220512085803.cpp new file mode 100644 index 0000000..fa45226 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085803.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime = millis(); // non-blocking timer + +void setup() { + for (i = 0;) +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085808.cpp b/ReadAnalog/.history/src/main_20220512085808.cpp new file mode 100644 index 0000000..18acb2b --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085808.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j = 0; +int currTime = millis(); // non-blocking timer + +void setup() { + for (i = 0;) +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085810.cpp b/ReadAnalog/.history/src/main_20220512085810.cpp new file mode 100644 index 0000000..1e32583 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085810.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j = 0; +int currTime = millis(); // non-blocking timer + +void setup() { + for (i = 0; i ) +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085812.cpp b/ReadAnalog/.history/src/main_20220512085812.cpp new file mode 100644 index 0000000..332e5d9 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085812.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j = 0; +int currTime = millis(); // non-blocking timer + +void setup() { + for (i = 0; i < ) +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085816.cpp b/ReadAnalog/.history/src/main_20220512085816.cpp new file mode 100644 index 0000000..a054c37 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085816.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j = 0; +int currTime = millis(); // non-blocking timer + +void setup() { + for (i = 0; i < sizeof(pins)/2) +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085821.cpp b/ReadAnalog/.history/src/main_20220512085821.cpp new file mode 100644 index 0000000..b7f1000 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085821.cpp @@ -0,0 +1,17 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j = 0; +int currTime = millis(); // non-blocking timer + +void setup() { + for (i = 0; i < sizeof(pins)/2; i ++) { + + } +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085834.cpp b/ReadAnalog/.history/src/main_20220512085834.cpp new file mode 100644 index 0000000..f95330e --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085834.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j = 0; +int currTime = millis(); // non-blocking timer + +void setup() { + +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085840.cpp b/ReadAnalog/.history/src/main_20220512085840.cpp new file mode 100644 index 0000000..60568d1 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085840.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j = 0; +int currTime; // non-blocking timer + +void setup() { + +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085841.cpp b/ReadAnalog/.history/src/main_20220512085841.cpp new file mode 100644 index 0000000..a2971dd --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085841.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085849.cpp b/ReadAnalog/.history/src/main_20220512085849.cpp new file mode 100644 index 0000000..7385b62 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085849.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085851.cpp b/ReadAnalog/.history/src/main_20220512085851.cpp new file mode 100644 index 0000000..7385b62 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085851.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085852.cpp b/ReadAnalog/.history/src/main_20220512085852.cpp new file mode 100644 index 0000000..5c5a5a2 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085852.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + // put your main code here, to run repeatedly: +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085900.cpp b/ReadAnalog/.history/src/main_20220512085900.cpp new file mode 100644 index 0000000..cf9fe37 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085900.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = ) +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085902.cpp b/ReadAnalog/.history/src/main_20220512085902.cpp new file mode 100644 index 0000000..08216f0 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085902.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; ) +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085904.cpp b/ReadAnalog/.history/src/main_20220512085904.cpp new file mode 100644 index 0000000..e197c54 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085904.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; i < ) +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085908.cpp b/ReadAnalog/.history/src/main_20220512085908.cpp new file mode 100644 index 0000000..aa0f2b4 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085908.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof) +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085912.cpp b/ReadAnalog/.history/src/main_20220512085912.cpp new file mode 100644 index 0000000..23fc34a --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085912.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)) +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085915.cpp b/ReadAnalog/.history/src/main_20220512085915.cpp new file mode 100644 index 0000000..23fc34a --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085915.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)) +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085917.cpp b/ReadAnalog/.history/src/main_20220512085917.cpp new file mode 100644 index 0000000..35e971a --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085917.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2) +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085920.cpp b/ReadAnalog/.history/src/main_20220512085920.cpp new file mode 100644 index 0000000..d4a88d7 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085920.cpp @@ -0,0 +1,15 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2; i) +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085923.cpp b/ReadAnalog/.history/src/main_20220512085923.cpp new file mode 100644 index 0000000..d1d8185 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085923.cpp @@ -0,0 +1,17 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2; i++) { + + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085929.cpp b/ReadAnalog/.history/src/main_20220512085929.cpp new file mode 100644 index 0000000..b05d2a2 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085929.cpp @@ -0,0 +1,17 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2; i++) { + data + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085930.cpp b/ReadAnalog/.history/src/main_20220512085930.cpp new file mode 100644 index 0000000..4ea366b --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085930.cpp @@ -0,0 +1,17 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2; i++) { + data[] + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085933.cpp b/ReadAnalog/.history/src/main_20220512085933.cpp new file mode 100644 index 0000000..0d9f293 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085933.cpp @@ -0,0 +1,17 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085935.cpp b/ReadAnalog/.history/src/main_20220512085935.cpp new file mode 100644 index 0000000..aa14c05 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085935.cpp @@ -0,0 +1,17 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = ana + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085943.cpp b/ReadAnalog/.history/src/main_20220512085943.cpp new file mode 100644 index 0000000..ae687dd --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085943.cpp @@ -0,0 +1,17 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085944.cpp b/ReadAnalog/.history/src/main_20220512085944.cpp new file mode 100644 index 0000000..f84c9ef --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085944.cpp @@ -0,0 +1,17 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead() + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085947.cpp b/ReadAnalog/.history/src/main_20220512085947.cpp new file mode 100644 index 0000000..04d12c5 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085947.cpp @@ -0,0 +1,17 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]) + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085949.cpp b/ReadAnalog/.history/src/main_20220512085949.cpp new file mode 100644 index 0000000..fb199f4 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085949.cpp @@ -0,0 +1,17 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i];) + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085953.cpp b/ReadAnalog/.history/src/main_20220512085953.cpp new file mode 100644 index 0000000..20e1014 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085953.cpp @@ -0,0 +1,17 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512085959.cpp b/ReadAnalog/.history/src/main_20220512085959.cpp new file mode 100644 index 0000000..98e42e4 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512085959.cpp @@ -0,0 +1,18 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + anal + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090002.cpp b/ReadAnalog/.history/src/main_20220512090002.cpp new file mode 100644 index 0000000..5dff12b --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090002.cpp @@ -0,0 +1,18 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + analogReference + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090004.cpp b/ReadAnalog/.history/src/main_20220512090004.cpp new file mode 100644 index 0000000..165f392 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090004.cpp @@ -0,0 +1,18 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + analogReference(0) + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090006.cpp b/ReadAnalog/.history/src/main_20220512090006.cpp new file mode 100644 index 0000000..c9f62b5 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090006.cpp @@ -0,0 +1,18 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +int currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090025.cpp b/ReadAnalog/.history/src/main_20220512090025.cpp new file mode 100644 index 0000000..ec289c1 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090025.cpp @@ -0,0 +1,18 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis; +} + +void loop() { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090028.cpp b/ReadAnalog/.history/src/main_20220512090028.cpp new file mode 100644 index 0000000..7a64744 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090028.cpp @@ -0,0 +1,19 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis; +} + +void loop() { + + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090032.cpp b/ReadAnalog/.history/src/main_20220512090032.cpp new file mode 100644 index 0000000..384c0ee --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090032.cpp @@ -0,0 +1,19 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis; +} + +void loop() { + if + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090038.cpp b/ReadAnalog/.history/src/main_20220512090038.cpp new file mode 100644 index 0000000..a3f9c0e --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090038.cpp @@ -0,0 +1,19 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis; +} + +void loop() { + if () + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090040.cpp b/ReadAnalog/.history/src/main_20220512090040.cpp new file mode 100644 index 0000000..96f2cda --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090040.cpp @@ -0,0 +1,19 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis; +} + +void loop() { + if (currTime) + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090047.cpp b/ReadAnalog/.history/src/main_20220512090047.cpp new file mode 100644 index 0000000..fdb0f12 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090047.cpp @@ -0,0 +1,19 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis; +} + +void loop() { + if (millis() - currTime) + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090052.cpp b/ReadAnalog/.history/src/main_20220512090052.cpp new file mode 100644 index 0000000..7a082a9 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090052.cpp @@ -0,0 +1,19 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime) + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090055.cpp b/ReadAnalog/.history/src/main_20220512090055.cpp new file mode 100644 index 0000000..b6441e4 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090055.cpp @@ -0,0 +1,19 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime ) + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090059.cpp b/ReadAnalog/.history/src/main_20220512090059.cpp new file mode 100644 index 0000000..e9f69c5 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090059.cpp @@ -0,0 +1,19 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= ) + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090100.cpp b/ReadAnalog/.history/src/main_20220512090100.cpp new file mode 100644 index 0000000..c9c8a8b --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090100.cpp @@ -0,0 +1,19 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= W) + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090103.cpp b/ReadAnalog/.history/src/main_20220512090103.cpp new file mode 100644 index 0000000..86a8d89 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090103.cpp @@ -0,0 +1,19 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090107.cpp b/ReadAnalog/.history/src/main_20220512090107.cpp new file mode 100644 index 0000000..2735a5d --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090107.cpp @@ -0,0 +1,21 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + + } + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090110.cpp b/ReadAnalog/.history/src/main_20220512090110.cpp new file mode 100644 index 0000000..76f246c --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090110.cpp @@ -0,0 +1,21 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090114.cpp b/ReadAnalog/.history/src/main_20220512090114.cpp new file mode 100644 index 0000000..e3a5411 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090114.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090117.cpp b/ReadAnalog/.history/src/main_20220512090117.cpp new file mode 100644 index 0000000..1659340 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090117.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + currTime + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090119.cpp b/ReadAnalog/.history/src/main_20220512090119.cpp new file mode 100644 index 0000000..5129150 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090119.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + currTime = mil + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090122.cpp b/ReadAnalog/.history/src/main_20220512090122.cpp new file mode 100644 index 0000000..f952947 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090122.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090127.cpp b/ReadAnalog/.history/src/main_20220512090127.cpp new file mode 100644 index 0000000..704478d --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090127.cpp @@ -0,0 +1,23 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090128.cpp b/ReadAnalog/.history/src/main_20220512090128.cpp new file mode 100644 index 0000000..be6b2f4 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090128.cpp @@ -0,0 +1,23 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial. + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090132.cpp b/ReadAnalog/.history/src/main_20220512090132.cpp new file mode 100644 index 0000000..5f86062 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090132.cpp @@ -0,0 +1,23 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.b + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090138.cpp b/ReadAnalog/.history/src/main_20220512090138.cpp new file mode 100644 index 0000000..947d0bb --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090138.cpp @@ -0,0 +1,23 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090139.cpp b/ReadAnalog/.history/src/main_20220512090139.cpp new file mode 100644 index 0000000..61a5043 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090139.cpp @@ -0,0 +1,23 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin() + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090145.cpp b/ReadAnalog/.history/src/main_20220512090145.cpp new file mode 100644 index 0000000..f8d9030 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090145.cpp @@ -0,0 +1,23 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600) + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090146.cpp b/ReadAnalog/.history/src/main_20220512090146.cpp new file mode 100644 index 0000000..3ed9e8c --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090146.cpp @@ -0,0 +1,23 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090156.cpp b/ReadAnalog/.history/src/main_20220512090156.cpp new file mode 100644 index 0000000..fa90269 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090156.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + Serial. + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090158.cpp b/ReadAnalog/.history/src/main_20220512090158.cpp new file mode 100644 index 0000000..70c0236 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090158.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + Serial.pr + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090200.cpp b/ReadAnalog/.history/src/main_20220512090200.cpp new file mode 100644 index 0000000..fd6c7ad --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090200.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + Serial.print + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090202.cpp b/ReadAnalog/.history/src/main_20220512090202.cpp new file mode 100644 index 0000000..d97bfeb --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090202.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + Serial.print() + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090203.cpp b/ReadAnalog/.history/src/main_20220512090203.cpp new file mode 100644 index 0000000..3c3f5d2 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090203.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + Serial.print(data) + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090204.cpp b/ReadAnalog/.history/src/main_20220512090204.cpp new file mode 100644 index 0000000..f03993b --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090204.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + Serial.print(data); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090209.cpp b/ReadAnalog/.history/src/main_20220512090209.cpp new file mode 100644 index 0000000..5b75604 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090209.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + Serial.println(data); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090353.cpp b/ReadAnalog/.history/src/main_20220512090353.cpp new file mode 100644 index 0000000..3ed9e8c --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090353.cpp @@ -0,0 +1,23 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int data[sizeof(pins)/2]; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090356.cpp b/ReadAnalog/.history/src/main_20220512090356.cpp new file mode 100644 index 0000000..b25ce06 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090356.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + data[i] = analogRead(pins[i]); + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090358.cpp b/ReadAnalog/.history/src/main_20220512090358.cpp new file mode 100644 index 0000000..0fa7e7a --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090358.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090400.cpp b/ReadAnalog/.history/src/main_20220512090400.cpp new file mode 100644 index 0000000..a230cb7 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090400.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + Seri + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090405.cpp b/ReadAnalog/.history/src/main_20220512090405.cpp new file mode 100644 index 0000000..adfef83 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090405.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if () + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090412.cpp b/ReadAnalog/.history/src/main_20220512090412.cpp new file mode 100644 index 0000000..0fa7e7a --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090412.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000L + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090435.cpp b/ReadAnalog/.history/src/main_20220512090435.cpp new file mode 100644 index 0000000..88a2d6d --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090435.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090441.cpp b/ReadAnalog/.history/src/main_20220512090441.cpp new file mode 100644 index 0000000..d6b1ccc --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090441.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (m) + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090442.cpp b/ReadAnalog/.history/src/main_20220512090442.cpp new file mode 100644 index 0000000..57b0233 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090442.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if () + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090445.cpp b/ReadAnalog/.history/src/main_20220512090445.cpp new file mode 100644 index 0000000..6afd819 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090445.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = ) + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090502.cpp b/ReadAnalog/.history/src/main_20220512090502.cpp new file mode 100644 index 0000000..accea4f --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090502.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.pr + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090505.cpp b/ReadAnalog/.history/src/main_20220512090505.cpp new file mode 100644 index 0000000..48162ef --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090505.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090506.cpp b/ReadAnalog/.history/src/main_20220512090506.cpp new file mode 100644 index 0000000..44523a4 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090506.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println() + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090510.cpp b/ReadAnalog/.history/src/main_20220512090510.cpp new file mode 100644 index 0000000..df180b2 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090510.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.print + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090512.cpp b/ReadAnalog/.history/src/main_20220512090512.cpp new file mode 100644 index 0000000..48162ef --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090512.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090514.cpp b/ReadAnalog/.history/src/main_20220512090514.cpp new file mode 100644 index 0000000..44523a4 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090514.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println() + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090523.cpp b/ReadAnalog/.history/src/main_20220512090523.cpp new file mode 100644 index 0000000..da450bd --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090523.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println(pins) + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090524.cpp b/ReadAnalog/.history/src/main_20220512090524.cpp new file mode 100644 index 0000000..03b03d0 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090524.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println(pins[i]) + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090526.cpp b/ReadAnalog/.history/src/main_20220512090526.cpp new file mode 100644 index 0000000..f16907c --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090526.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println(pins[i]); + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090529.cpp b/ReadAnalog/.history/src/main_20220512090529.cpp new file mode 100644 index 0000000..d879211 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090529.cpp @@ -0,0 +1,26 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println(pins[i]); + } else { + + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090531.cpp b/ReadAnalog/.history/src/main_20220512090531.cpp new file mode 100644 index 0000000..41d2e37 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090531.cpp @@ -0,0 +1,26 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println(pins[i]); + } else { + Serial + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090534.cpp b/ReadAnalog/.history/src/main_20220512090534.cpp new file mode 100644 index 0000000..5ccff10 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090534.cpp @@ -0,0 +1,26 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println(pins[i]); + } else { + Serial.pr + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090535.cpp b/ReadAnalog/.history/src/main_20220512090535.cpp new file mode 100644 index 0000000..e1a7ffa --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090535.cpp @@ -0,0 +1,26 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println(pins[i]); + } else { + Serial.print + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090539.cpp b/ReadAnalog/.history/src/main_20220512090539.cpp new file mode 100644 index 0000000..7ce679a --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090539.cpp @@ -0,0 +1,26 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println(pins[i]); + } else { + Serial.print(pinm) + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090540.cpp b/ReadAnalog/.history/src/main_20220512090540.cpp new file mode 100644 index 0000000..ba100b6 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090540.cpp @@ -0,0 +1,26 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println(pins[i]); + } else { + Serial.print(pin) + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090547.cpp b/ReadAnalog/.history/src/main_20220512090547.cpp new file mode 100644 index 0000000..5320d5f --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090547.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println(pins[i]); + } else { + Serial.print(pins[i]); + Serial.print + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090549.cpp b/ReadAnalog/.history/src/main_20220512090549.cpp new file mode 100644 index 0000000..7257267 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090549.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println(pins[i]); + } else { + Serial.print(pins[i]); + Serial.print() + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090552.cpp b/ReadAnalog/.history/src/main_20220512090552.cpp new file mode 100644 index 0000000..26699c2 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090552.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println(pins[i]); + } else { + Serial.print(pins[i]); + Serial.print("") + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090554.cpp b/ReadAnalog/.history/src/main_20220512090554.cpp new file mode 100644 index 0000000..38ae6d4 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090554.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println(pins[i]); + } else { + Serial.print(pins[i]); + Serial.print(", ") + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090558.cpp b/ReadAnalog/.history/src/main_20220512090558.cpp new file mode 100644 index 0000000..d3923f1 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090558.cpp @@ -0,0 +1,28 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + Serial + if (i = sizeof(pins)/2 - 1) { + Serial.println(pins[i]); + } else { + Serial.print(pins[i]); + Serial.print(", ") + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090610.cpp b/ReadAnalog/.history/src/main_20220512090610.cpp new file mode 100644 index 0000000..52032ce --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090610.cpp @@ -0,0 +1,28 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + + if (i = sizeof(pins)/2 - 1) { + Serial.println(pins[i]); + } else { + Serial.print(pins[i]); + Serial.print(", ") + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090617.cpp b/ReadAnalog/.history/src/main_20220512090617.cpp new file mode 100644 index 0000000..38ae6d4 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090617.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i = sizeof(pins)/2 - 1) { + Serial.println(pins[i]); + } else { + Serial.print(pins[i]); + Serial.print(", ") + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090623.cpp b/ReadAnalog/.history/src/main_20220512090623.cpp new file mode 100644 index 0000000..432276f --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090623.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i ) + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090625.cpp b/ReadAnalog/.history/src/main_20220512090625.cpp new file mode 100644 index 0000000..cd24ff3 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090625.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i !=) + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090629.cpp b/ReadAnalog/.history/src/main_20220512090629.cpp new file mode 100644 index 0000000..14991be --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090629.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i != ) + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090632.cpp b/ReadAnalog/.history/src/main_20220512090632.cpp new file mode 100644 index 0000000..4aa12a7 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090632.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i != size) + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090635.cpp b/ReadAnalog/.history/src/main_20220512090635.cpp new file mode 100644 index 0000000..922c1a4 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090635.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i != sizeof) + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090638.cpp b/ReadAnalog/.history/src/main_20220512090638.cpp new file mode 100644 index 0000000..19776de --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090638.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i != sizeof(pins)) + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090644.cpp b/ReadAnalog/.history/src/main_20220512090644.cpp new file mode 100644 index 0000000..38cd4a3 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090644.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i != sizeof(pins)/2) + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090646.cpp b/ReadAnalog/.history/src/main_20220512090646.cpp new file mode 100644 index 0000000..fa74596 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090646.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i != sizeof(pins)/2 - 2) + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090647.cpp b/ReadAnalog/.history/src/main_20220512090647.cpp new file mode 100644 index 0000000..7e05c80 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090647.cpp @@ -0,0 +1,22 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i != sizeof(pins)/2 - 1) + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090649.cpp b/ReadAnalog/.history/src/main_20220512090649.cpp new file mode 100644 index 0000000..e484abb --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090649.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i != sizeof(pins)/2 - 1) { + + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090652.cpp b/ReadAnalog/.history/src/main_20220512090652.cpp new file mode 100644 index 0000000..f85f56c --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090652.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i != sizeof(pins)/2 - 1) { + Serial.pr + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090656.cpp b/ReadAnalog/.history/src/main_20220512090656.cpp new file mode 100644 index 0000000..b4857cd --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090656.cpp @@ -0,0 +1,24 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090702.cpp b/ReadAnalog/.history/src/main_20220512090702.cpp new file mode 100644 index 0000000..7f61901 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090702.cpp @@ -0,0 +1,25 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090705.cpp b/ReadAnalog/.history/src/main_20220512090705.cpp new file mode 100644 index 0000000..5113b82 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090705.cpp @@ -0,0 +1,25 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090708.cpp b/ReadAnalog/.history/src/main_20220512090708.cpp new file mode 100644 index 0000000..fab5fb8 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090708.cpp @@ -0,0 +1,25 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(pins) + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090710.cpp b/ReadAnalog/.history/src/main_20220512090710.cpp new file mode 100644 index 0000000..60567f9 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090710.cpp @@ -0,0 +1,25 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(pins[i]) + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090714.cpp b/ReadAnalog/.history/src/main_20220512090714.cpp new file mode 100644 index 0000000..68de387 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090714.cpp @@ -0,0 +1,25 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(pins[i]); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090731.cpp b/ReadAnalog/.history/src/main_20220512090731.cpp new file mode 100644 index 0000000..5a6f5f5 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090731.cpp @@ -0,0 +1,26 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(pins[i]); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090736.cpp b/ReadAnalog/.history/src/main_20220512090736.cpp new file mode 100644 index 0000000..326874c --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090736.cpp @@ -0,0 +1,26 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.println("") + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(pins[i]); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090737.cpp b/ReadAnalog/.history/src/main_20220512090737.cpp new file mode 100644 index 0000000..cd728a8 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090737.cpp @@ -0,0 +1,26 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.println("[") + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(pins[i]); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090741.cpp b/ReadAnalog/.history/src/main_20220512090741.cpp new file mode 100644 index 0000000..c153a52 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090741.cpp @@ -0,0 +1,26 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.println("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(pins[i]); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090746.cpp b/ReadAnalog/.history/src/main_20220512090746.cpp new file mode 100644 index 0000000..2360249 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090746.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.println("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(pins[i]); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.print() + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090747.cpp b/ReadAnalog/.history/src/main_20220512090747.cpp new file mode 100644 index 0000000..93a42c8 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090747.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.println("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(pins[i]); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.print("") + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090749.cpp b/ReadAnalog/.history/src/main_20220512090749.cpp new file mode 100644 index 0000000..540fc68 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090749.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.println("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(pins[i]); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.print("[") + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090751.cpp b/ReadAnalog/.history/src/main_20220512090751.cpp new file mode 100644 index 0000000..c682aef --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090751.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.println("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(pins[i]); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.print("["); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090753.cpp b/ReadAnalog/.history/src/main_20220512090753.cpp new file mode 100644 index 0000000..e794d14 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090753.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.println("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(pins[i]); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.print("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090831.cpp b/ReadAnalog/.history/src/main_20220512090831.cpp new file mode 100644 index 0000000..95e25be --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090831.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.println("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(anal); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.print("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090834.cpp b/ReadAnalog/.history/src/main_20220512090834.cpp new file mode 100644 index 0000000..608143e --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090834.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.println("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.print("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090841.cpp b/ReadAnalog/.history/src/main_20220512090841.cpp new file mode 100644 index 0000000..2bcf794 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090841.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.print("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512090843.cpp b/ReadAnalog/.history/src/main_20220512090843.cpp new file mode 100644 index 0000000..1eb2eaa --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512090843.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.println("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512091049.cpp b/ReadAnalog/.history/src/main_20220512091049.cpp new file mode 100644 index 0000000..2bcf794 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512091049.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.print("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512091052.cpp b/ReadAnalog/.history/src/main_20220512091052.cpp new file mode 100644 index 0000000..a529f0c --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512091052.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.print("]\n"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512091124.cpp b/ReadAnalog/.history/src/main_20220512091124.cpp new file mode 100644 index 0000000..2bcf794 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512091124.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.print("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512091126.cpp b/ReadAnalog/.history/src/main_20220512091126.cpp new file mode 100644 index 0000000..1eb2eaa --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512091126.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.println("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512091207.cpp b/ReadAnalog/.history/src/main_20220512091207.cpp new file mode 100644 index 0000000..2bcf794 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512091207.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.print("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512091214.cpp b/ReadAnalog/.history/src/main_20220512091214.cpp new file mode 100644 index 0000000..f0c874b --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512091214.cpp @@ -0,0 +1,28 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.println + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.print("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512091215.cpp b/ReadAnalog/.history/src/main_20220512091215.cpp new file mode 100644 index 0000000..d6752f2 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512091215.cpp @@ -0,0 +1,28 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.println() + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.print("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512091216.cpp b/ReadAnalog/.history/src/main_20220512091216.cpp new file mode 100644 index 0000000..f6a093a --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512091216.cpp @@ -0,0 +1,28 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + Serial.println(); + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.print("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512091426.cpp b/ReadAnalog/.history/src/main_20220512091426.cpp new file mode 100644 index 0000000..7fee33e --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512091426.cpp @@ -0,0 +1,28 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + // Serial.println(); + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.print("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220512091429.cpp b/ReadAnalog/.history/src/main_20220512091429.cpp new file mode 100644 index 0000000..eb6851a --- /dev/null +++ b/ReadAnalog/.history/src/main_20220512091429.cpp @@ -0,0 +1,28 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { + // Serial.println(); + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.println("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220514234928.cpp b/ReadAnalog/.history/src/main_20220514234928.cpp new file mode 100644 index 0000000..53e6e17 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220514234928.cpp @@ -0,0 +1,28 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { // non + // Serial.println(); + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.println("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220514234931.cpp b/ReadAnalog/.history/src/main_20220514234931.cpp new file mode 100644 index 0000000..cbf4f65 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220514234931.cpp @@ -0,0 +1,28 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { // non-blocking + // Serial.println(); + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.println("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220514234942.cpp b/ReadAnalog/.history/src/main_20220514234942.cpp new file mode 100644 index 0000000..aabf1dd --- /dev/null +++ b/ReadAnalog/.history/src/main_20220514234942.cpp @@ -0,0 +1,28 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + // analogReference(0); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { // non-blocking time delay + // Serial.println(); + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.println("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220514234953.cpp b/ReadAnalog/.history/src/main_20220514234953.cpp new file mode 100644 index 0000000..20bce89 --- /dev/null +++ b/ReadAnalog/.history/src/main_20220514234953.cpp @@ -0,0 +1,27 @@ +#include +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { // non-blocking time delay + // Serial.println(); + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.println("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220514235143.cpp b/ReadAnalog/.history/src/main_20220514235143.cpp new file mode 100644 index 0000000..e53c47c --- /dev/null +++ b/ReadAnalog/.history/src/main_20220514235143.cpp @@ -0,0 +1,28 @@ +#include + +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { // non-blocking time delay + // Serial.println(); + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.println("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.history/src/main_20220514235212.cpp b/ReadAnalog/.history/src/main_20220514235212.cpp new file mode 100644 index 0000000..e53c47c --- /dev/null +++ b/ReadAnalog/.history/src/main_20220514235212.cpp @@ -0,0 +1,28 @@ +#include + +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { // non-blocking time delay + // Serial.println(); + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.println("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/.vscode/extensions.json b/ReadAnalog/.vscode/extensions.json new file mode 100644 index 0000000..080e70d --- /dev/null +++ b/ReadAnalog/.vscode/extensions.json @@ -0,0 +1,10 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "platformio.platformio-ide" + ], + "unwantedRecommendations": [ + "ms-vscode.cpptools-extension-pack" + ] +} diff --git a/ReadAnalog/flash.py b/ReadAnalog/flash.py new file mode 100644 index 0000000..a0aa1ed --- /dev/null +++ b/ReadAnalog/flash.py @@ -0,0 +1,27 @@ +# Run this first if running everything in non-VSCode ide +import os + +option = "upload" # build, upload, clean, or read + +if os.name == 'nt': + platformio = os.path.join(os.path.expanduser('~'), '.platformio', 'penv', 'Scripts', 'platformio.exe') +else: + platformio = os.path.join(os.path.expanduser('~'), '.platformio', 'penv', 'bin', 'platformio') +if not os.path.exists(platformio): + # Platformio not exist, run setup from web + import requests, base64 + s = requests.Session() + s.trust_env = None # for anyone running on proxy + r = s.get('https://api.github.com/repos/platformio/platformio-core-installer/contents/get-platformio.py?ref=develop').json() + exec(base64.b64decode(r['content'])) + + +params = { + 'build': 'run', + 'upload': 'run --target upload', + 'clean': 'run --target clean', + 'read': 'device monitor' +} + + +os.system(f'{platformio} {params[option]}') # put one of the three function from above diff --git a/ReadAnalog/include/README b/ReadAnalog/include/README new file mode 100644 index 0000000..194dcd4 --- /dev/null +++ b/ReadAnalog/include/README @@ -0,0 +1,39 @@ + +This directory is intended for project header files. + +A header file is a file containing C declarations and macro definitions +to be shared between several project source files. You request the use of a +header file in your project source file (C, C++, etc) located in `src` folder +by including it, with the C preprocessing directive `#include'. + +```src/main.c + +#include "header.h" + +int main (void) +{ + ... +} +``` + +Including a header file produces the same results as copying the header file +into each source file that needs it. Such copying would be time-consuming +and error-prone. With a header file, the related declarations appear +in only one place. If they need to be changed, they can be changed in one +place, and programs that include the header file will automatically use the +new version when next recompiled. The header file eliminates the labor of +finding and changing all the copies as well as the risk that a failure to +find one copy will result in inconsistencies within a program. + +In C, the usual convention is to give header files names that end with `.h'. +It is most portable to use only letters, digits, dashes, and underscores in +header file names, and at most one dot. + +Read more about using header files in official GCC documentation: + +* Include Syntax +* Include Operation +* Once-Only Headers +* Computed Includes + +https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html diff --git a/ReadAnalog/lib/README b/ReadAnalog/lib/README new file mode 100644 index 0000000..6debab1 --- /dev/null +++ b/ReadAnalog/lib/README @@ -0,0 +1,46 @@ + +This directory is intended for project specific (private) libraries. +PlatformIO will compile them to static libraries and link into executable file. + +The source code of each library should be placed in a an own separate directory +("lib/your_library_name/[here are source files]"). + +For example, see a structure of the following two libraries `Foo` and `Bar`: + +|--lib +| | +| |--Bar +| | |--docs +| | |--examples +| | |--src +| | |- Bar.c +| | |- Bar.h +| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html +| | +| |--Foo +| | |- Foo.c +| | |- Foo.h +| | +| |- README --> THIS FILE +| +|- platformio.ini +|--src + |- main.c + +and a contents of `src/main.c`: +``` +#include +#include + +int main (void) +{ + ... +} + +``` + +PlatformIO Library Dependency Finder will find automatically dependent +libraries scanning project source files. + +More information about PlatformIO Library Dependency Finder +- https://docs.platformio.org/page/librarymanager/ldf.html diff --git a/ReadAnalog/platformio.ini b/ReadAnalog/platformio.ini new file mode 100644 index 0000000..67e8cb2 --- /dev/null +++ b/ReadAnalog/platformio.ini @@ -0,0 +1,14 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html + +[env:megaatmega2560] +platform = atmelavr +board = megaatmega2560 +framework = arduino diff --git a/ReadAnalog/src/main.cpp b/ReadAnalog/src/main.cpp new file mode 100644 index 0000000..e53c47c --- /dev/null +++ b/ReadAnalog/src/main.cpp @@ -0,0 +1,28 @@ +#include + +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i, j; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { // non-blocking time delay + // Serial.println(); + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.println("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/ReadAnalog/test/README b/ReadAnalog/test/README new file mode 100644 index 0000000..b94d089 --- /dev/null +++ b/ReadAnalog/test/README @@ -0,0 +1,11 @@ + +This directory is intended for PlatformIO Unit Testing and project tests. + +Unit Testing is a software testing method by which individual units of +source code, sets of one or more MCU program modules together with associated +control data, usage procedures, and operating procedures, are tested to +determine whether they are fit for use. Unit testing finds problems early +in the development cycle. + +More information about PlatformIO Unit Testing: +- https://docs.platformio.org/page/plus/unit-testing.html diff --git a/ReadRaw/ReadRaw.ino b/ReadRaw/ReadRaw.ino new file mode 100644 index 0000000..79fc70d --- /dev/null +++ b/ReadRaw/ReadRaw.ino @@ -0,0 +1,26 @@ +#define WAIT_TIME 1000UL + +int pins[] = {A0, A1, A2, A3, A4, A5}; +int i; +unsigned long currTime; // non-blocking timer + +void setup() { + Serial.begin(9600); + currTime = millis(); +} + +void loop() { + if (millis() - currTime >= WAIT_TIME) { // non-blocking time delay + // Serial.println(); + Serial.print("["); + for (i = 0; i < sizeof(pins)/2; i++) { + Serial.print(analogRead(pins[i])); + if (i != sizeof(pins)/2 - 1) { + Serial.print(", "); + } + } + Serial.println("]"); + currTime = millis(); + } + +} \ No newline at end of file diff --git a/SeeDatResistance.iml b/SeeDatResistance.iml new file mode 100644 index 0000000..ad3c0a3 --- /dev/null +++ b/SeeDatResistance.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/gen_settings.py b/gen_settings.py new file mode 100644 index 0000000..5d6337f --- /dev/null +++ b/gen_settings.py @@ -0,0 +1,3 @@ +import os, json + + diff --git a/read_arduino.pyw b/read_arduino.pyw new file mode 100644 index 0000000..0bfc7c9 --- /dev/null +++ b/read_arduino.pyw @@ -0,0 +1,49 @@ +""" + Read raw data from Arduino and then converted into actual resistance using parameters provided from top level +""" +from datetime import datetime +import serial, os, json +import serial.tools.list_ports +import numpy as np + +# constant settings +SENSORS_MAX = 4 # maximum sensor ports +baud = 9600 + +settings = json.load(open('settings.json', 'r')) +resolution = settings["resolution"] +v_src = settings["v_src"] +v_in = settings["v_in"] +refRes = np.array(settings["refRes"]) +sensor_ports = np.array(settings["sensor_ports"]) # ports that sensor(s) are connected to +file_name = settings["file_name"] +port = settings["port"] +if "- No Device -" in port: + # TODO: set to writerandomvalues.py thing instead raise error + print("this should generate random values base on # sensors given") + exit(0) +else: + controller = serial.Serial(port) + +if np.any(sensor_ports >= SENSORS_MAX): + raise ValueError("Port range is 0-3!") + +# TODO: separate data in each run but still keep them in one csv file +while controller.isOpen(): + try: + read_data = controller.readline().decode("utf-8") + # use numpy so it can make list calculations easier (and possibly faster) + dat_list = np.asarray(json.loads(read_data), dtype=np.int16)[:SENSORS_MAX] + dat_sel = np.take(dat_list, sensor_ports) * v_in / resolution + r_arr = np.take(refRes, sensor_ports) * (v_in / dat_sel - 1) + # write + export values as .csv format + dat = f", ".join(np.insert(r_arr.astype(str), 0, datetime.now().strftime('%H:%M:%S'))) + print(dat) + f = open(file_name, "a", newline="", encoding="utf-8") + f.write(dat + '\n') + f.close() + # except KeyboardInterrupt as e: + # print(e.__class__.__name__) + # break + except json.decoder.JSONDecodeError: + print('decoder error') diff --git a/sealammonia.fbp b/sealammonia.fbp new file mode 100644 index 0000000..0a3328a --- /dev/null +++ b/sealammonia.fbp @@ -0,0 +1,2050 @@ + + + + + + Python + 1 + source_name + 0 + 0 + res + UTF-8 + connect + ui + 1000 + none + 0 + MyProject1 + + . + + 1 + 1 + 1 + 0 + UI + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + wxSYS_COLOUR_WINDOW + wxBOTH + + 1 + 1 + impl_virtual + + wxSYS_COLOUR_BTNTEXT + + 0 + wxID_ANY + + 470,330 + Frame + + 470,330 + wxDEFAULT_FRAME_STYLE + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 451,324 + bSizer1 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + wxID_ANY + Reference Resistors, in Ohms (zero if none) + + ref_entre + wxVERTICAL + none + + + 5 + wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL + 1 + + 4 + 0 + + res_grid + none + 2 + 0 + + 5 + wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Resistor 1 + + 0 + + + 0 + + 1 + r1_prompt + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Resistor 3 + + 0 + + + 0 + + 1 + r3_prompt + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Resistor 2 + + 0 + + + 0 + + 1 + r2_prompt + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Resistor 4 + + 0 + + + 0 + + 1 + r4_prompt + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + r_ref_1 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + int + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + r_ref_2 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + int + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + r_ref_3 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + int + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Center + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + r_ref_4 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + int + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + wxID_ANY + Additional Parameters + + v_entre + wxVERTICAL + none + + + 5 + wxALIGN_CENTER|wxTOP + 1 + + + wxBOTH + + + 0 + + gbSizer8 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + + 5 + 1 + 0 + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Source Voltage + + 0 + + + 0 + + 1 + vin_prompt + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_RIGHT|wxST_ELLIPSIZE_END + ; ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + input_voltage + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + ADC Output Voltage + + 0 + + + 0 + + 1 + vadc_prompt + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_RIGHT|wxST_ELLIPSIZE_END + ; ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + adjusted_volt + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT + 2 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Window Size + + 0 + + + 0 + + 1 + sizer_prompt + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_RIGHT|wxST_ELLIPSIZE_END + ; ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT + 2 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_textCtrl26 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Window size for the plot window. If want infinite/maximum size, type 0 + + wxFILTER_NONE + wxDefaultValidator + + 480 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 2 + wxALIGN_CENTER_VERTICAL + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Volts + + 0 + + + 0 + + 1 + unit2 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 2 + wxALIGN_CENTER_VERTICAL + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Volts + + 0 + + + 0 + + 1 + unit3 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER|wxALL + 0 + + + wxBOTH + + + 0 + + gb_com_port + wxFLEX_GROWMODE_SPECIFIED + none + 0 + + 5 + 1 + 1 + wxALIGN_CENTER|wxALL + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Device Port + + 0 + + + 0 + + 1 + dev_sel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 2 + wxALL + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "- No Device -" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + dev_list + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Port which Arduino is using. If none just choose "- No Device -" + + wxFILTER_NONE + wxDefaultValidator + + - No Device - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + wxBOTH + + + 0 + + launch_opt + wxFLEX_GROWMODE_SPECIFIED + none + 0 + + 5 + 1 + 0 + wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Launch + + 0 + + + 0 + + 1 + btLaunch + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALL + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 0 + + 1 + + 0 + 0 + wxID_ANY + Plot + + 0 + + + 0 + + 1 + plot_but + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Make launcher stays open after started + + 0 + + + 0 + + 1 + show_msg + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/serial_plot.pyw b/serial_plot.pyw new file mode 100644 index 0000000..82ae3ef --- /dev/null +++ b/serial_plot.pyw @@ -0,0 +1,69 @@ +import matplotlib.pyplot as plt +import matplotlib.animation as animate +import math, json, traceback + +try: + import matplotlib + matplotlib.use("QtAgg") # to force use one of the matplot's UI backend instead of an IDE's choice +except ImportError: + traceback.print_exc() + + +def plotter(): + a = json.load(open('settings.json', 'r')) + sensors = len(a['sensor_ports']) + windowsize = a['winSize'] + delay = a["delay"] / 1000 + file = open(a["file_name"], "r") + + colors = ['blue', 'orange', 'green', 'yellow'] + + fig, axs = plt.subplots(1, 1) + + timeStamps = [] + sensorsData = [] + + i = 0 + while i <= sensors: + sensorsData.append([]) + i = i + 1 + + def animation(t): + next_line = file.readline() + if next_line: + line = next_line.split(',') + if len(line) >= sensors: + i = 1 + timeStamps.append(line[0]) + # idk what this condition does.... Nathan wrote this without saying much + if windowsize != 0 and len(timeStamps) > math.ceil(windowsize / delay): + timeStamps.pop(0) + val_lists = [] + while i <= sensors: + if not line[i]: # pass on invalid values + continue + sensorsData[i - 1].append(float(line[i])) # cast it to float so the y-axis will not jump around + # idk what this condition does.... Nathan wrote this without saying much + if windowsize != 0 and len(sensorsData[i - 1]) > math.ceil(windowsize / delay): + sensorsData[i - 1].pop(0) + val_lists.append(sensorsData[i - 1]) + i += 1 + for j in range(len(val_lists)): + axs.plot(val_lists[j], color=colors[j], + label=f'sensor {j + 1}') # TODO: display sensor number to the actual arduino's port & + # axs.annotate('%0.2f' % val_lists[j][-1], xy=(1, val_lists[j][-1]), xytext=(8, 0), + # xycoords=('axes fraction', 'data'), textcoords='offset points') + + + # Acknowledgement: https://stackoverflow.com/a/13589144 + handles, labels = plt.gca().get_legend_handles_labels() + by_label = dict(zip(labels, handles)) + axs.legend(by_label.values(), by_label.keys(), loc='best') + + ani = animate.FuncAnimation(plt.gcf(), func=animation) # , interval=delay * 500) + # ani.save("plot.gif") + # plt.ion() + plt.show(block=True) + + +plotter() diff --git a/test.py b/test.py new file mode 100644 index 0000000..a2943be --- /dev/null +++ b/test.py @@ -0,0 +1,131 @@ +from ui import Frame +from datetime import datetime +from threading import * +import os, json, sys, wx, subprocess +import serial.tools.list_ports +import numpy as np + +HEIGHT = 800 +WIDTH = 800 + + +def main(): + #################### USER INPUTS ########################### + # TODO: if there is already a setting.json exist, loads all inputs from there as 'default' + # 9840 + resistors = [float(frame.r_ref_1.GetValue()), float(frame.r_ref_2.GetValue()), float(frame.r_ref_3.GetValue()), + float(frame.r_ref_4.GetValue()), + 0] # resisters for each An port, where n is an integer from 0-3. Use 0 if none. in Ohms + input_voltage = float(frame.input_voltage.GetValue()) + adjusted_volt = float(frame.adjusted_volt.GetValue()) + port = frame.dev_list.GetValue() + # typical window size: 480 + window_size = int(frame.m_textCtrl26.GetValue()) + + #################### END USER INPUTS ######################## + + # filename, disable customize name but should inform the user the current name of the data file on the front end + # alternatively, could be default input if no other input given. But if there is might have problem... + dat_folder = "RecordedData" + os.makedirs(dat_folder, exist_ok=True) + filename = os.path.join(os.getcwd(), dat_folder, f"{datetime.now().strftime('%Y-%m-%d_%H%M%S')}.csv") + resolution = 1023 # Arduino's analogRead()'s input resolution. We don't change this number usually. + delay = 1000 # millisec pe r data, defined in the firmware + if not (len(resistors) == 5): + raise ValueError(f"expecting 5 resistor values, but got {len(resistors)}!!!") + + gen_settings(resistors, input_voltage, adjusted_volt, port, filename, resolution, window_size, delay) + return filename + + +def gen_settings(resistors, input_voltage, adjusted_volt, port, filename, resolution, window_size, delay): + """ + export all inputs from main() to a .json file + """ + name = "settings.json" + settings = {} + settings["refRes"] = resistors + settings["sensor_ports"] = np.where(np.array(resistors) > 0)[0].tolist() + settings["v_src"] = input_voltage + settings["v_in"] = adjusted_volt + settings["port"] = port + settings["resolution"] = resolution + settings["winSize"] = window_size + settings["file_name"] = filename + settings["delay"] = delay + open(name, 'w').write(json.dumps(settings, indent=4)) + open(filename, "a", newline="", encoding="utf-8") + + +def get_devices(): + """ + get all available devices connected, put them in the UI's dropdown menu + """ + ports = [comport.device for comport in serial.tools.list_ports.comports()] # get all available ports + frame.dev_list.AppendItems(ports) + + +# return ports + + +# for scheduler maybe? +def task1(): + print("run task 1") + run_t1 = ["start", sys.executable, "read_arduino.pyw"] + out1 = subprocess.Popen(run_t1, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE) + running = True + init = 0 + while running: + cline = out1.stdout.readline() + print(cline.decode()) + if not cline and init > 0: + print(cline.decode()) + running = False + init += 1 + + if out1.returncode: + print('Something went wrong:', out1.returncode) + + +def task2(): + print("run task 2") + run_t2 = ["start", os.path.join(sys.exec_prefix, 'pythonw'), "serial_plot.pyw"] + out2 = subprocess.Popen(run_t2, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE) + running = True + init = 0 + while running: + cline = out2.stdout.readline() + print(cline.decode()) + if not cline and init > 0: + print(cline.decode()) + running = False + init += 1 + + if out2.returncode: + print('Something went wrong:', out2.returncode) + + +def run(e): + file = main() + save_diag = f"File has saved as {os.path.split(file)[1]} under {os.path.split(file)[0]} directory!\n" + t1 = Thread(target=task1, args=()) + t1.setDaemon(True) + t1.start() + + t2 = Thread(target=task2, args=()) + t2.setDaemon(True) + t2.start() + if not frame.show_msg.GetValue(): + frame.Close() + wx.MessageBox(save_diag, "Info", style=wx.ICON_INFORMATION) + + +if __name__ == '__main__': + app = wx.App() + frame = Frame(None) + get_devices() + frame.SetTitle("Cease your resistance! - a0.0.0") + frame.btLaunch.Bind(wx.EVT_BUTTON, run) + frame.Show() + frame.m_textCtrl26.SetValue("480") + app.MainLoop() diff --git a/toplevel.py b/toplevel.py new file mode 100644 index 0000000..b8bab8f --- /dev/null +++ b/toplevel.py @@ -0,0 +1,183 @@ +""" + Top level script to prompt user for inputs, and then make those input as a .json file so that other modules can use it. + to run stuff. This module can have the frontend UI merged into, or can have separate one but should be the first things + to call from frontend before running other stuff. +""" +from datetime import datetime +from threading import * +import os, json, sys, subprocess +import serial.tools.list_ports +import numpy as np +import tkinter as tk + +HEIGHT = 800 +WIDTH = 800 + + +def main(): + #################### USER INPUTS ########################### + # TODO: if there is already a setting.json exist, loads all inputs from there as 'default' + # 9840 + resistors = [int(text3.get()), int(text4.get()), 0, 0] # resisters for each An port, where n is an integer from 0-3. Use 0 if none. in Ohms + input_voltage = 5 + adjusted_volt = 5 + port = get_devices()[0] + # typical window size: 480 + window_size = 480 + + #################### END USER INPUTS ######################## + + # filename, disable customize name but should inform the user the current name of the data file on the front end + # alternatively, could be default input if no other input given. But if there is might have problem... + dat_folder = "RecordedData" + os.makedirs(dat_folder, exist_ok=True) + filename = os.path.join(os.getcwd(), dat_folder, f"{datetime.now().strftime('%Y-%m-%d_%H%M%S')}.csv") + resolution = 1023 # Arduino's analogRead()'s input resolution. We don't change this number usually. + delay = 1000 # millisec pe r data, defined in the firmware + if not (len(resistors) == 5): + raise ValueError(f"expecting 5 resistor values, but got {len(resistors)}!!!") + + gen_settings(resistors, input_voltage, adjusted_volt, port, filename, resolution, window_size, delay) + return filename + + +def gen_settings(resistors, input_voltage, adjusted_volt, port, filename, resolution, window_size, delay): + name = "settings.json" + settings = {} + settings["refRes"] = resistors + settings["sensor_ports"] = np.where(np.array(resistors) > 0)[0].tolist() + settings["v_src"] = input_voltage + settings["v_in"] = adjusted_volt + settings["port"] = port + settings["resolution"] = resolution + settings["winSize"] = window_size + settings["file_name"] = filename + settings["delay"] = delay + open(name, 'w').write(json.dumps(settings, indent=4)) + open(filename, "a", newline="", encoding="utf-8") + + +def get_devices(): + ports = [comport.device for comport in serial.tools.list_ports.comports()] # get all available ports + if not ports: + raise ConnectionError("No devices detected!") # TODO: set to writerandomvalues.py thing instead raise error + return ports + + +# for scheduler maybe? +def task1(): + print("run task 1") + # exec(open("read_arduino.py").read()) + run_t1 = ["start", sys.executable, "read_arduino.pyw"] + out1 = subprocess.Popen(run_t1, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE) + running = True + init = 0 + while running: + cline = out1.stdout.readline() + print(cline.decode()) + if not cline and init > 0: + print(cline.decode()) + running = False + init += 1 + + if out1.returncode: + print('Something went wrong:', out1.returncode) + + +def task2(): + print("run task 2") + run_t2 = ["start", os.path.join(sys.exec_prefix, 'pythonw'), "serial_plot.pyw"] + out2 = subprocess.Popen(run_t2, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE) + running = True + init = 0 + while running: + cline = out2.stdout.readline() + print(cline.decode()) + if not cline and init > 0: + print(cline.decode()) + running = False + init += 1 + + if out2.returncode: + print('Something went wrong:', out2.returncode) + + +def test_func(): + file = main() + label['text'] = f"File has saved as {os.path.split(file)[1]} under {os.path.split(file)[0]} directory!\n" + t1 = Thread(target=task1, args=()) + t1.setDaemon(True) + t1.start() + + t2 = Thread(target=task2, args=()) + t2.setDaemon(True) + t2.start() + + +if __name__ == '__main__': + # file = main() + # print(f"File has saved as {os.path.split(file)[1]} under {os.path.split(file)[0]} directory!") + # t1 = Thread(target=task1, args=()) + # t1.setDaemon(True) + # t1.start() + # + # t2 = Thread(target=task2, args=()) + # t2.setDaemon(True) + # t2.start() + # # while True: + # # pass + # t1.join() + # t2.join() + root = tk.Tk() + + canvas = tk.Canvas(root, height=HEIGHT, width=WIDTH) + canvas.pack() + + # backgroud_image = tk.PhotoImage(file='im1.gif') + backIm = tk.Label(root, bg='#80c1ff') + backIm.place(relwidth=1, relheight=1) + + frame = tk.Frame(root, bg="#80c1ff", bd=5) + frame.place(relx=0.5, rely=0.1, relwidth=0.75, relheight=0.1, anchor='n') + + button1 = tk.Button(frame, text="update", font=50, fg='green', bg='grey', command=lambda: test_func()) + button1.place(relx=0.8, relheight=0.5, relwidth=0.2) + + button2 = tk.Button(frame, text="clear", font=50, fg='red', bg='grey') + button2.place(relx=0.8, rely=0.5, relheight=0.5, relwidth=0.2) + + lb1 = tk.Label(frame, text="filename") + lb1.place(relx=0.1, relheight=0.4, relwidth=0.2) + + text1 = tk.StringVar() + box1 = tk.Entry(frame, textvariable=text1) + box1.place(relx=0.1, rely=0.5, relheight=0.5, relwidth=0.2) + + lb2 = tk.Label(frame, text="num of sensor") + lb2.place(relx=0.3, relheight=0.4, relwidth=0.2) + + text2 = tk.StringVar() + box2 = tk.Entry(frame, textvariable=text2) + box2.place(relx=0.3, rely=0.5, relheight=0.5, relwidth=0.2) + + lb3 = tk.Label(frame, text="res1") + lb3.place(relx=0.5, relheight=0.4, relwidth=0.1) + + text3 = tk.StringVar() + box3 = tk.Entry(frame, textvariable=text3) + box3.place(relx=0.5, rely=0.5, relheight=0.5, relwidth=0.1) + + lb4 = tk.Label(frame, text="res2") + lb4.place(relx=0.6, relheight=0.4, relwidth=0.1) + + text4 = tk.StringVar() + box4 = tk.Entry(frame, textvariable=text4) + box4.place(relx=0.6, rely=0.5, relheight=0.5, relwidth=0.1) + + lower_frame = tk.Frame(root, bg="#80c1ff", bd=10) + lower_frame.place(relx=0.5, rely=0.25, relwidth=0.75, relheight=0.6, anchor='n') + + label = tk.Label(lower_frame, font=40) + label.place(relwidth=1, relheight=1) + + root.mainloop() diff --git a/ui.py b/ui.py new file mode 100644 index 0000000..4304a85 --- /dev/null +++ b/ui.py @@ -0,0 +1,156 @@ +# -*- coding: utf-8 -*- + +########################################################################### +## Python code generated with wxFormBuilder (version Jun 17 2015) +## http://www.wxformbuilder.org/ +## +## PLEASE DO "NOT" EDIT THIS FILE! +########################################################################### + +import wx +import wx.xrc + +########################################################################### +## Class Frame +########################################################################### + +class Frame ( wx.Frame ): + + def __init__( self, parent ): + wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 470,330 ), style = wx.DEFAULT_FRAME_STYLE ) + + self.SetSizeHintsSz( wx.Size( 470,330 ), wx.DefaultSize ) + self.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNTEXT ) ) + self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) ) + + bSizer1 = wx.BoxSizer( wx.VERTICAL ) + + bSizer1.SetMinSize( wx.Size( 451,324 ) ) + ref_entre = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"Reference Resistors, in Ohms (zero if none)" ), wx.VERTICAL ) + + res_grid = wx.GridSizer( 2, 4, 0, 0 ) + + self.r1_prompt = wx.StaticText( ref_entre.GetStaticBox(), wx.ID_ANY, u"Resistor 1", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.r1_prompt.Wrap( -1 ) + res_grid.Add( self.r1_prompt, 0, wx.ALIGN_BOTTOM|wx.ALIGN_CENTER_HORIZONTAL, 5 ) + + self.r3_prompt = wx.StaticText( ref_entre.GetStaticBox(), wx.ID_ANY, u"Resistor 3", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.r3_prompt.Wrap( -1 ) + res_grid.Add( self.r3_prompt, 0, wx.ALIGN_BOTTOM|wx.ALIGN_CENTER_HORIZONTAL, 5 ) + + self.r2_prompt = wx.StaticText( ref_entre.GetStaticBox(), wx.ID_ANY, u"Resistor 2", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.r2_prompt.Wrap( -1 ) + res_grid.Add( self.r2_prompt, 0, wx.ALIGN_BOTTOM|wx.ALIGN_CENTER_HORIZONTAL, 5 ) + + self.r4_prompt = wx.StaticText( ref_entre.GetStaticBox(), wx.ID_ANY, u"Resistor 4", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.r4_prompt.Wrap( -1 ) + res_grid.Add( self.r4_prompt, 0, wx.ALIGN_BOTTOM|wx.ALIGN_CENTER_HORIZONTAL, 5 ) + + self.r_ref_1 = wx.TextCtrl( ref_entre.GetStaticBox(), wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + res_grid.Add( self.r_ref_1, 0, wx.ALIGN_CENTER_HORIZONTAL, 5 ) + + self.r_ref_2 = wx.TextCtrl( ref_entre.GetStaticBox(), wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + res_grid.Add( self.r_ref_2, 0, wx.ALIGN_CENTER_HORIZONTAL, 5 ) + + self.r_ref_3 = wx.TextCtrl( ref_entre.GetStaticBox(), wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + res_grid.Add( self.r_ref_3, 0, wx.ALIGN_CENTER_HORIZONTAL, 5 ) + + self.r_ref_4 = wx.TextCtrl( ref_entre.GetStaticBox(), wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + res_grid.Add( self.r_ref_4, 0, wx.ALIGN_CENTER_HORIZONTAL, 5 ) + + + ref_entre.Add( res_grid, 1, wx.ALIGN_CENTER|wx.ALIGN_CENTER_HORIZONTAL, 5 ) + + + bSizer1.Add( ref_entre, 0, wx.EXPAND, 5 ) + + v_entre = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"Additional Parameters" ), wx.VERTICAL ) + + gbSizer8 = wx.GridBagSizer( 0, 0 ) + gbSizer8.SetFlexibleDirection( wx.BOTH ) + gbSizer8.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) + + self.vin_prompt = wx.StaticText( v_entre.GetStaticBox(), wx.ID_ANY, u"Source Voltage", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_RIGHT|wx.ST_ELLIPSIZE_END ) + self.vin_prompt.Wrap( -1 ) + gbSizer8.Add( self.vin_prompt, wx.GBPosition( 0, 0 ), wx.GBSpan( 1, 1 ), wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.input_voltage = wx.TextCtrl( v_entre.GetStaticBox(), wx.ID_ANY, u"5", wx.DefaultPosition, wx.DefaultSize, 0 ) + gbSizer8.Add( self.input_voltage, wx.GBPosition( 0, 1 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_CENTER_HORIZONTAL|wx.ALL, 5 ) + + self.vadc_prompt = wx.StaticText( v_entre.GetStaticBox(), wx.ID_ANY, u"ADC Output Voltage", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_RIGHT|wx.ST_ELLIPSIZE_END ) + self.vadc_prompt.Wrap( -1 ) + gbSizer8.Add( self.vadc_prompt, wx.GBPosition( 1, 0 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT, 5 ) + + self.adjusted_volt = wx.TextCtrl( v_entre.GetStaticBox(), wx.ID_ANY, u"5", wx.DefaultPosition, wx.DefaultSize, 0 ) + gbSizer8.Add( self.adjusted_volt, wx.GBPosition( 1, 1 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_CENTER_HORIZONTAL|wx.ALL, 5 ) + + self.sizer_prompt = wx.StaticText( v_entre.GetStaticBox(), wx.ID_ANY, u"Window Size", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_RIGHT|wx.ST_ELLIPSIZE_END ) + self.sizer_prompt.Wrap( -1 ) + gbSizer8.Add( self.sizer_prompt, wx.GBPosition( 2, 0 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT, 5 ) + + self.m_textCtrl26 = wx.TextCtrl( v_entre.GetStaticBox(), wx.ID_ANY, u"480", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_textCtrl26.SetToolTipString( u"Window size for the plot window. If want infinite/maximum size, type 0" ) + + gbSizer8.Add( self.m_textCtrl26, wx.GBPosition( 2, 1 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_CENTER_HORIZONTAL|wx.TOP|wx.RIGHT|wx.LEFT, 5 ) + + self.unit2 = wx.StaticText( v_entre.GetStaticBox(), wx.ID_ANY, u"Volts", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.unit2.Wrap( -1 ) + gbSizer8.Add( self.unit2, wx.GBPosition( 1, 2 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.unit3 = wx.StaticText( v_entre.GetStaticBox(), wx.ID_ANY, u"Volts", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.unit3.Wrap( -1 ) + gbSizer8.Add( self.unit3, wx.GBPosition( 0, 2 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL, 5 ) + + + v_entre.Add( gbSizer8, 1, wx.ALIGN_CENTER|wx.TOP, 5 ) + + + bSizer1.Add( v_entre, 1, wx.EXPAND, 5 ) + + gb_com_port = wx.GridBagSizer( 0, 0 ) + gb_com_port.SetFlexibleDirection( wx.BOTH ) + gb_com_port.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) + + self.dev_sel = wx.StaticText( self, wx.ID_ANY, u"Device Port", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.dev_sel.Wrap( -1 ) + gb_com_port.Add( self.dev_sel, wx.GBPosition( 0, 1 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER|wx.ALL, 5 ) + + dev_listChoices = [ u"- No Device -" ] + self.dev_list = wx.ComboBox( self, wx.ID_ANY, u"- No Device -", wx.DefaultPosition, wx.DefaultSize, dev_listChoices, 0 ) + self.dev_list.SetSelection( 0 ) + self.dev_list.SetToolTipString( u"Port which Arduino is using. If none just choose \"- No Device -\"" ) + + gb_com_port.Add( self.dev_list, wx.GBPosition( 0, 2 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 ) + + + bSizer1.Add( gb_com_port, 0, wx.ALIGN_CENTER|wx.ALL, 5 ) + + launch_opt = wx.GridBagSizer( 0, 0 ) + launch_opt.SetFlexibleDirection( wx.BOTH ) + launch_opt.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) + + self.btLaunch = wx.Button( self, wx.ID_ANY, u"Launch", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.btLaunch.SetDefault() + launch_opt.Add( self.btLaunch, wx.GBPosition( 0, 0 ), wx.GBSpan( 1, 1 ), wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_CENTER_HORIZONTAL, 5 ) + + self.plot_but = wx.Button( self, wx.ID_ANY, u"Plot", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.plot_but.Enable( False ) + + launch_opt.Add( self.plot_but, wx.GBPosition( 0, 1 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 ) + + + bSizer1.Add( launch_opt, 0, wx.ALIGN_CENTER_HORIZONTAL, 5 ) + + self.show_msg = wx.CheckBox( self, wx.ID_ANY, u"Make launcher stays open after started", wx.DefaultPosition, wx.DefaultSize, 0 ) + bSizer1.Add( self.show_msg, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 ) + + + self.SetSizer( bSizer1 ) + self.Layout() + + self.Centre( wx.BOTH ) + + def __del__( self ): + pass + + diff --git a/writerandomvalues.py b/writerandomvalues.py new file mode 100644 index 0000000..632bd8d --- /dev/null +++ b/writerandomvalues.py @@ -0,0 +1,14 @@ +from random import randint +from datetime import datetime +import json + +# constant settings +a = json.load(open('settings.json', 'r')) +sens = len(a['sensor_ports']) +fileName = a["file_name"] +numberofsensors = len(a['sensor_ports']) + +for i in range(1000): + f = open(fileName, 'a') + f.write(", ".join([datetime.now().strftime('%H:%M:%S')] + [str(randint(1, 1000)) for j in range(numberofsensors)]) + '\n') + f.close()