Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Code and documentation for the teensy logger, which forwards encoder, height and imu data to a laptop via USB

Notifications You must be signed in to change notification settings

African-Robotics-Unit/sensor-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sensor logger

Code and documentation for the teensy logger, which forwards encoder, height and imu data to a laptop via USB

Image of the circuit

Components used

Component Voltage Pins
VL53 height sensor 3.3-5V SDA -> 18, SCL -> 19
MPU-9250 imu 3.3V SDA -> 17, SCL -> 16
E6B2-CWZ3E encoder 5V A -> 0, B -> 1

Note that the values in the table could be out of date - when it doubt, look at the circuit and source code directly

Software

Programmed using the platform.io extension in vs code. See the platformio.ini file for dependancies, but the extension should install everything for you

The scripts/receive_comms.py Python script has some demo code to receive data from the teensy, save it to a file and plot the result

Usage

If you're working within a Git project, add using

git submodule add https://github.com/African-Robotics-Unit/sensor-logger sensor_logger

(ie, rename it to sensor_logger, which is a more Python-friendly path name)

Plug the teensy into a computer via USB

Upload code by pressing ctrl+alt+U within VS Code (which makes PlatformIO build and upload the code to the teensy)

Run the example Python script to receive data:

python scripts/receive_commms.py

(Look at the script for required libraries, but it's basically just matplotlib and pyserial). Press ctrl+C when done, and you should see a plot!

Contributing

Please keep this repo alive and consistent with the actual state of the sensor! Don't update the files with code specific to your project - either copy-paste and modify, or better yet, create a branch and work in there. The main branch should be general purpose and simple to understand

About

Code and documentation for the teensy logger, which forwards encoder, height and imu data to a laptop via USB

Resources

Stars

Watchers

Forks