From 8ee0231c3ee987ed4e334005497d9df5f07f8a54 Mon Sep 17 00:00:00 2001 From: David-Rey Date: Sat, 10 Jun 2023 17:04:55 -0400 Subject: [PATCH 1/6] testing IMU with new config stuff --- EosPayload/drivers/telemetry_I2C_driver.py | 2 +- config.json | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/EosPayload/drivers/telemetry_I2C_driver.py b/EosPayload/drivers/telemetry_I2C_driver.py index ca3a914..318319b 100644 --- a/EosPayload/drivers/telemetry_I2C_driver.py +++ b/EosPayload/drivers/telemetry_I2C_driver.py @@ -28,7 +28,7 @@ def read_thread_enabled() -> bool: def device_read(self, logger: logging.Logger) -> None: logger.info("Starting to poll for data!") - self.i2c = busio.I2C(pin.I2C1_SCL, pin.I2C1_SDA) + self.i2c = busio.I2C(pin.I2C2_SCL, pin.I2C2_SDA) self.bno = BNO055_I2C(self.i2c) count = 0 diff --git a/config.json b/config.json index 344c6cc..40f95be 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { - "payload_name": "Kian_2", + "payload_name": "David_1", "devices": [ @@ -19,6 +19,12 @@ } }, + { + "driver_class": "TelemetryI2CDriver", + "device_id": "MISC_SENSOR_1", + "enabled": "true" + }, + { "name": "secondary-printing-driver", "driver_class": "TestConfigDriver", From 8b9b6b22a5ce4f9e0195d0e816b319d8efbe3423 Mon Sep 17 00:00:00 2001 From: David-Rey Date: Sat, 10 Jun 2023 17:23:50 -0400 Subject: [PATCH 2/6] testing new pressure sensor --- EosPayload/drivers/telemetry_I2C_driver.py | 3 +++ requirements.txt | 1 + 2 files changed, 4 insertions(+) diff --git a/EosPayload/drivers/telemetry_I2C_driver.py b/EosPayload/drivers/telemetry_I2C_driver.py index 318319b..c485c10 100644 --- a/EosPayload/drivers/telemetry_I2C_driver.py +++ b/EosPayload/drivers/telemetry_I2C_driver.py @@ -3,6 +3,7 @@ import busio from adafruit_bno055 import BNO055_I2C +from adafruit_mprls import MPRLS from datetime import datetime from EosLib.packet.data_header import DataHeader @@ -20,6 +21,7 @@ class TelemetryI2CDriver(DriverBase): def __init__(self, output_directory: str, config: dict): super().__init__(output_directory, config) self.bno = None + self.mprls = None self.i2c = None @staticmethod @@ -30,6 +32,7 @@ def device_read(self, logger: logging.Logger) -> None: logger.info("Starting to poll for data!") self.i2c = busio.I2C(pin.I2C2_SCL, pin.I2C2_SDA) self.bno = BNO055_I2C(self.i2c) + self.mprls = MPRLS(self.i2c) count = 0 while True: diff --git a/requirements.txt b/requirements.txt index 1823d3e..dce7a05 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,6 +18,7 @@ smbus2~=0.4.2 #adafruit-circuitpython-ms8607~=1.0.16 #adafruit-circuitpython-tsl2591~=1.3.9 #adafruit-circuitpython-ltr390~=1.1.12 +adafruit-circuitpython-mprls adafruit-circuitpython-tsl2591 adafruit-circuitpython-ltr390 adafruit-circuitpython-tmp117 From 7c6b030acaefcf80ed58176f14f4b00ef3c9bd50 Mon Sep 17 00:00:00 2001 From: David-Rey Date: Sat, 10 Jun 2023 17:30:19 -0400 Subject: [PATCH 3/6] testing new pressure sensor --- EosPayload/drivers/telemetry_I2C_driver.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/EosPayload/drivers/telemetry_I2C_driver.py b/EosPayload/drivers/telemetry_I2C_driver.py index c485c10..5641e00 100644 --- a/EosPayload/drivers/telemetry_I2C_driver.py +++ b/EosPayload/drivers/telemetry_I2C_driver.py @@ -20,7 +20,7 @@ class TelemetryI2CDriver(DriverBase): def __init__(self, output_directory: str, config: dict): super().__init__(output_directory, config) - self.bno = None + #self.bno = None self.mprls = None self.i2c = None @@ -31,10 +31,14 @@ def read_thread_enabled() -> bool: def device_read(self, logger: logging.Logger) -> None: logger.info("Starting to poll for data!") self.i2c = busio.I2C(pin.I2C2_SCL, pin.I2C2_SDA) - self.bno = BNO055_I2C(self.i2c) + #self.bno = BNO055_I2C(self.i2c) self.mprls = MPRLS(self.i2c) count = 0 + while True: + print((self.mprls.pressure,)) + time.sleep(1) + while True: # get data from BNO055 From 115e6243b2f4217cd28a9a2484645dcbd077ea86 Mon Sep 17 00:00:00 2001 From: David-Rey Date: Sat, 10 Jun 2023 17:31:26 -0400 Subject: [PATCH 4/6] testing new pressure sensor --- EosPayload/drivers/telemetry_I2C_driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EosPayload/drivers/telemetry_I2C_driver.py b/EosPayload/drivers/telemetry_I2C_driver.py index 5641e00..d7cfce4 100644 --- a/EosPayload/drivers/telemetry_I2C_driver.py +++ b/EosPayload/drivers/telemetry_I2C_driver.py @@ -36,7 +36,7 @@ def device_read(self, logger: logging.Logger) -> None: count = 0 while True: - print((self.mprls.pressure,)) + logger.info(self.mprls.pressure,) time.sleep(1) while True: From 7a024bc6600b602d91ea56dc19955066b9b6f5ae Mon Sep 17 00:00:00 2001 From: David-Rey Date: Sat, 10 Jun 2023 18:01:10 -0400 Subject: [PATCH 5/6] testing new pressure sensor --- EosPayload/drivers/telemetry_I2C_driver.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/EosPayload/drivers/telemetry_I2C_driver.py b/EosPayload/drivers/telemetry_I2C_driver.py index d7cfce4..6e8e0d1 100644 --- a/EosPayload/drivers/telemetry_I2C_driver.py +++ b/EosPayload/drivers/telemetry_I2C_driver.py @@ -20,8 +20,8 @@ class TelemetryI2CDriver(DriverBase): def __init__(self, output_directory: str, config: dict): super().__init__(output_directory, config) - #self.bno = None - self.mprls = None + self.bno = None + #self.mprls = None self.i2c = None @staticmethod @@ -31,13 +31,13 @@ def read_thread_enabled() -> bool: def device_read(self, logger: logging.Logger) -> None: logger.info("Starting to poll for data!") self.i2c = busio.I2C(pin.I2C2_SCL, pin.I2C2_SDA) - #self.bno = BNO055_I2C(self.i2c) - self.mprls = MPRLS(self.i2c) + self.bno = BNO055_I2C(self.i2c) + #self.mprls = MPRLS(self.i2c) count = 0 - while True: - logger.info(self.mprls.pressure,) - time.sleep(1) + #while True: + # logger.info(self.mprls.pressure,) + # time.sleep(1) while True: From 4ebfc4f974c9d572a4ebdb341163aaef1d4bf093 Mon Sep 17 00:00:00 2001 From: David-Rey Date: Sat, 10 Jun 2023 18:14:21 -0400 Subject: [PATCH 6/6] testing GPS on new PCB --- config.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config.json b/config.json index 40f95be..df6d009 100644 --- a/config.json +++ b/config.json @@ -25,6 +25,12 @@ "enabled": "true" }, + { + "driver_class": "GPSDriver", + "device_id": "GPS", + "enabled": "true" + }, + { "name": "secondary-printing-driver", "driver_class": "TestConfigDriver",