From 7513b7fdb628aaf88008377a89206bf1ef531ae1 Mon Sep 17 00:00:00 2001 From: Selcuk Sari Date: Sat, 25 Jun 2022 16:49:32 +0300 Subject: [PATCH] initial commit --- Rev1/Platforms/ESP32/esp32.ini | 1 + Rev1/Platforms/STM32/stm32.ini | 0 Rev1/main.py | 49 ++++++++++++++++++++++++++++++++++ Rev1/requirements.txt | 27 +++++++++++++++++++ 4 files changed, 77 insertions(+) create mode 100644 Rev1/Platforms/ESP32/esp32.ini create mode 100644 Rev1/Platforms/STM32/stm32.ini create mode 100644 Rev1/main.py create mode 100644 Rev1/requirements.txt diff --git a/Rev1/Platforms/ESP32/esp32.ini b/Rev1/Platforms/ESP32/esp32.ini new file mode 100644 index 0000000..89ada17 --- /dev/null +++ b/Rev1/Platforms/ESP32/esp32.ini @@ -0,0 +1 @@ +esptool.py --chip auto --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 16MB 0x8000 partition_table/partition-table.bin 0x10000 ota_data_initial.bin 0xf000 phy_multiple_init_data.bin 0x1000 bootloader/bootloader.bin 0x100000 esp-at.bin 0x20000 at_customize.bin 0x24000 customized_partitions/server_cert.bin 0x39000 customized_partitions/mqtt_key.bin 0x26000 customized_partitions/server_key.bin 0x28000 customized_partitions/server_ca.bin 0x2e000 customized_partitions/client_ca.bin 0x30000 customized_partitions/factory_param.bin 0x21000 customized_partitions/ble_data.bin 0x3B000 customized_partitions/mqtt_ca.bin 0x37000 customized_partitions/mqtt_cert.bin 0x2a000 customized_partitions/client_cert.bin 0x2c000 customized_partitions/client_key.bin \ No newline at end of file diff --git a/Rev1/Platforms/STM32/stm32.ini b/Rev1/Platforms/STM32/stm32.ini new file mode 100644 index 0000000..e69de29 diff --git a/Rev1/main.py b/Rev1/main.py new file mode 100644 index 0000000..bbfa36f --- /dev/null +++ b/Rev1/main.py @@ -0,0 +1,49 @@ +# import os +# import subprocess + +# list_files = subprocess.run(["ls", "-l"]) +# # list_files2 = subprocess.run(["echo \"Hello World\" && echo \"Hello world 2\""]) +# list_files2 = subprocess.run(["echo Hello World && echo Hello World 2",""]); +# print("The exit code was: %d" % list_files.returncode) +# print("The exit code was: %d" % list_files2.returncode) + + +# def test(): +# rootdir = './Projects' +# projects = os.listdir(rootdir); +# print(projects); + + + +# def main(): +# # test(); +# # print("hello from main"); +# pass; + + +# if __name__ == "__main__": +# main(); + + + +def gather_info(): + height = float(input("What is your height? (inches or meters) ")) + weight = float(input("What is your weight? (pounds or kilograms) ")) + system = input("Are your measurements in metric or imperial systems? ").lower().strip() + return (height, weight, system) +def calculate_bmi(weight, height, system='metric'): + if system == 'metric': + bmi = (weight / (height ** 2)) + else: + bmi = 703 * (weight / (height ** 2)) + return bmi +while True: + height, weight, system = gather_info() + if system.startswith('i'): + bmi = calculate_bmi(weight, system='imperial', height=height) + print(f"Your BMI is {bmi}") + elif system.startswith('m'): + bmi = calculate_bmi(weight, height) + print(f"Your BMI is {bmi}") + else: + print("Error: Unknown measurement system. Please use imperial or metric.") \ No newline at end of file diff --git a/Rev1/requirements.txt b/Rev1/requirements.txt new file mode 100644 index 0000000..243940d --- /dev/null +++ b/Rev1/requirements.txt @@ -0,0 +1,27 @@ +aiofiles==0.8.0 +ajsonrpc==1.2.0 +anyio==3.6.1 +asgiref==3.5.2 +bottle==0.12.21 +certifi==2022.6.15 +charset-normalizer==2.0.12 +click==8.1.3 +colorama==0.4.5 +h11==0.13.0 +idna==3.3 +ifaddr==0.2.0 +marshmallow==3.16.0 +packaging==21.3 +platformio==6.0.2 +pyelftools==0.28 +pyparsing==3.0.9 +pyserial==3.5 +requests==2.28.0 +semantic-version==2.10.0 +sniffio==1.2.0 +starlette==0.20.3 +tabulate==0.8.10 +urllib3==1.26.9 +uvicorn==0.17.6 +wsproto==1.1.0 +zeroconf==0.38.7