Working on a project that involves i2c devices:
-8 MPU6050 gyro/accelerometers from Invensense
-SDA and SCL lines multiplexed via two separate multiplexers
-i2cDevLib for C++ classes to control the MPU6050s (i2cdevlib/Arduino at master · jrowberg/i2cdevlib · GitHub)
-Arduino 1.0.1 on a linux 3.6.5 kernel
I've written a class file (MpuSensor.cpp) that has an MPU6050 object and performs some operations on the data it receives (integration, kalman filtering, and quaternion math). This class isn't complete yet, but the methods inside it have worked separately as functions in a basic ino file, and there is enough of it written that it should compile so far as I can tell.
When I try to compile the file MpuSensor.ino I get the following errors in Arduino's main.cpp:
undefined reference to setup()
undefined reference to loop()
despite these functions being defined in my ino file.
Can anyone help? Why aren't these functions being linked during compilation?
The code I'm using is attached.
MpuSensor.ino
MpuSensor.h
MpuSensor.cpp
Kalman.h - 3rd party class file for kalman filtering (works)
MpuSensor.ino (2.28 KB)
MpuSensor.h (1.78 KB)
MpuSensor.cpp (3.22 KB)
Kalman.h (3.3 KB)