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

Documentation update #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
# LabJackCanbus
This repository contains Python scripts developed by Dallas Formula Racing for the purpose of reading data from a LabJack DAQ into CSV files. These scripts are intended to facilitate data acquisition and logging for data-analysis and manipulation. The labjack device we are using is the LabJackT7Pro, information about this device can be found here: https://labjack.com/pages/support?doc=%2Fdatasheets%2Ft-series-datasheet%2F
This repository contains Python scripts developed by Dallas Formula Racing for the purpose of reading data from a LabJack DAQ into CSV files. These scripts are intended to facilitate data acquisition and logging for data-analysis and manipulation.

## Labjack Link
https://github.com/labjack/labjack-ljm-python/tree/master
## LabJack
The LabJack model used is the LabJackT7Pro.
- [LabJack datasheet](https://labjack.com/pages/support?doc=%2Fdatasheets%2Ft-series-datasheet%2F)
- [LabJack python library](https://github.com/labjack/labjack-ljm-python/tree/master)

## Sensor Data Sheets
- Analog Acel: https://www.analog.com/media/en/technical-documentation/data-sheets/adxl335.pdf
- Digital Acel: https://www.adafruit.com/product/4438
- Linpot: https://www.pegasusautoracing.com/productselection.asp?Product=MC-206&utm_source=google&utm_medium=cpc&utm_campaign=MC-206&gad_source=1&gclid=Cj0KCQiAy9msBhD0ARIsANbk0A8R3RR0sLIwCP6Y3Wp2lnhvHBwkFSwJzNTXNTJI-pUplBrkuiK3jzgaAv8YEALw_wcB
## Sensors
- [Accelerometer/Gyroscope](https://www.adafruit.com/product/1714#technical-details)
- [Accelerometer datasheet](https://cdn-shop.adafruit.com/datasheets/LSM303DLHC.PDF)
- [Gyroscope datasheet](https://cdn-shop.adafruit.com/datasheets/L3GD20.pdf)
- [Linear potentiometer](https://www.pegasusautoracing.com/productselection.asp?Product=MC-206)

## Requirements
1. Start a virtual enviornment by running 'python -m venv venv_name_here'
2. activate your virtual enviornment
3. install the requiremetns, to install the requirements run the command 'pip install -r requirements.txt' this will install all of the necesarry packages for this project.
## Getting started
1. Start a virtual environment by running `python -m venv venv_name_here`
2. Activate your virtual environment
3. Install the necessary packages by running the command `pip install -r requirements.txt`.

## File Overview
DAQ.py: Main handler, contains a single while loop and utilizes the xl and linpot classes to read and record data
Data: contains test data from initial runs
Read_Xl: Digital sensor code utilizing I2C
Read_Xl_Analog: Analog sensor code

## Current Goal / Future Implementations
- Migration to Streams for analog inputs: This will allow us to sample the linear potentiometers at a higher frequency
- Live Telemtry
- `DAQ.py`: Main handler, contains a single while loop and utilizes the accelerometer and potentiometer classes to read and record data
- `/button/ReadState.py`: Reads a digital switch through the LabJack to determine the state of the DAQ
- `/sensors/AnalogStream.py`: Reads from analog sensors through the LabJack
- `/sensors/GyroAndAccel.py`: Reads from the accelerometer/gyroscope sensors through I2C
- `/ecu_can/CanBus.py`: Reads from the ECU through can messages
- `/data`: Contains test data from initial runs