tcleg / Six_Axis_Complementary_Filter

Platform Independent 6 DOF Complementary Filter
MIT License
47 stars 14 forks source link

Arduino integration #1

Closed vladinator1000 closed 7 years ago

vladinator1000 commented 8 years ago

This library looks awesome! I'm trying to call it inside my Arduino sketch, but I get this error. Sorry for the dumb question, but I'm just starting out:

#include "SparkFunLSM6DS3.h" 
#include "Wire.h"
#include "SPI.h"
#include "six_axis_comp_filter.h"

LSM6DS3 myIMU; // Constructor for the motion sensor (this works)
CompSixAxis test; // this breaks

when I try to initialise an instance of the class it gives me this error: no matching function for call to 'CompSixAxis::CompSixAxis()'

vladinator1000 commented 8 years ago

This fixed my issue: http://stackoverflow.com/questions/36579735/initialising-a-c-library-in-arduino/36579831?noredirect=1#comment60759487_36579831

tcleg commented 8 years ago

Hi savovs,

Glad you were able to get it going. I originally came up with this library for use with my auto-balancing robot I built back in 2014. It worked a beauty with the gyroscope and accelerometer module I was using, but was a pain in the rear to figure out the math and theory behind how a complementary filter works in practice. So, I decided to go ahead and share it on Github. Maybe save some other people in the world some time with it.

Thanks!

On Tue, Apr 12, 2016 at 11:16 AM, savovs notifications@github.com wrote:

This library looks awesome! I'm trying to call it inside my Arduino sketch, but I get this error. Sorry for the dumb question, but I'm just starting out:

include "SparkFunLSM6DS3.h"

include "Wire.h"

include "SPI.h"

include "six_axis_comp_filter.h"

LSM6DS3 myIMU; // Constructor for the motion sensor (this works) CompSixAxis test; // this breaks

when I try to initialise an instance of the class it gives me this error: no matching function for call to 'CompSixAxis::CompSixAxis()'

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/tcleg/Six_Axis_Complementary_Filter/issues/1

-Trent Cleghorn

vladinator1000 commented 8 years ago

It works like a charm! Good job man. I'm using it to control an audio synthesiser, I'll probably make a video about how to get it going some time soon. You have made my life 10 times easier with this library.

I had to make a couple of variables public because I couldn't figure out how to use the compAngle values in my code, but that's probably because I'm a noob.

Hope you're doing well!

Vlady

tcleg commented 8 years ago

Sweet!

On Tue, Apr 12, 2016 at 8:03 PM, savovs notifications@github.com wrote:

It works like a charm! Good job man. I'm using it to control an audio synthesiser, I'll probably make a video about how to get it going some time soon. You have made my life 10 times easier with this library.

I had to make a couple of variables public because I couldn't figure out how to use the compAngle values in my code, but that's probably because I'm a noob.

Hope you're doing well!

Vlady

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/tcleg/Six_Axis_Complementary_Filter/issues/1#issuecomment-209171112

-Trent Cleghorn