Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

73 summer driver testing #82

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion EosPayload/drivers/telemetry_I2C_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -28,10 +30,15 @@ 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)
#self.mprls = MPRLS(self.i2c)
count = 0

#while True:
# logger.info(self.mprls.pressure,)
# time.sleep(1)

while True:

# get data from BNO055
Expand Down
14 changes: 13 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"payload_name": "Kian_2",
"payload_name": "David_1",
"devices":
[

Expand All @@ -19,6 +19,18 @@
}
},

{
"driver_class": "TelemetryI2CDriver",
"device_id": "MISC_SENSOR_1",
"enabled": "true"
},

{
"driver_class": "GPSDriver",
"device_id": "GPS",
"enabled": "true"
},

{
"name": "secondary-printing-driver",
"driver_class": "TestConfigDriver",
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down