xioTechnologies / Gait-Tracking-With-x-IMU

961 stars 414 forks source link

Use Matlab code with Arduino 101 #8

Closed ilpigna closed 6 years ago

ilpigna commented 6 years ago

I'm trying to adapt this code to use it with the imu data coming from an Arduino 101, but i have some problems. Has anyone ever tried to do it? One of the problem i'm fighting is that it is difficult to have a constant sampling "printing" rate, because I can set the sampling rate of the accelerometer in the arduino, but it is difficult to set it to make it print the values at a desidered rate.

Looking at the Matlab code I have the following questions: 1)What do you mean with startTime and stopTime? Do you mean the duration of the event or the part of the event that you are going to read/consider? Because in the default example code it starts from 6 and it goes to 26.

2)Second question is about the sample period; considering this value, do you mean the value of the "printing" rate of the value coming from the IMU or is it the sampling/reading rate set in the IMU and it prints at different speed? Have i to change it also in the AHRS.m ?

3)Is it possible to have the code that you run in your x-IMU?

4)Does it work well even if i don't use the magnetometer?

Thanks for your help

xioTechnologies commented 6 years ago

The code in this repository was written for an x-IMU. It will not work with other hardware unless either the code is modified or the other hardware is customised to provide data identical to the x-IMU.