Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bin2gyroflow

Arduino code to read data from a gyroscope and accelerometer (MPU9250 or MPU6050) and create the input file needed for Gyroflow.

This code is designed to be implemented on a Canon EOS M camera. Therefore, it also has the ability to start and stop recording simultaneously with data collection using an infrared LED. In this way it will be easier to synchronize video with data.

I used an adafruit adalogger M0 which includes a micro SD reader.

Arduino wiring

MPU <--> Arduino

Pin MPU Pin Arduino
VIN 3.3V
GND GND
SDA SDA
SCL SCL

Button

  • D0 and GND

Led IR

  • D1

Led Status

  • D8

This sketch collects sensor data at 500hz and stores it on an SD card in a .bin file. Within each sketch, there is a section to calibrate the sensors. These values ​​depend on each sensor. If you don't know how to calculate them, comment out those lines or set them to zero.

A Python script transforms it into a .csv file and another one .gcsv in the order and with the information needed for Gyroflow. You must have Python, Matplotlib, and Pandas installed.

If not, you can download this compiled version as an executable, you can directly drag the bin file on top of the exe. https://drive.google.com/file/d/1pJ2vf0mFSjwScH8ZquT1gEyG7ZH4Bwls/view?usp=sharing

How to transform bin file

To run the python script use the following code:

python bin2flow.py data01.bin

where data01.bin will depend on which file you are reading.

The sensor orientation can then be changed in Gyroflow.

And that's it, I'm leaving you a sample file so you can transform it and the corresponding video so you can try it in Gyroflow.

About

Arduino code to read data from a gyroscope and accelerometer and create the input file needed for Gyroflow.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages