Hey everyone,
First please excuse if I've made anything wrong. It's my first time in this forum.
Then please excuse my language, I'm german.
Now the real problem...
I'm trying to get the MPU6050 DMP6 run on an S-Funktion block in Simulink.
I'm using the latest I2Cdev library and Matlab R2013b.
So I inserted the nearly whole code from that MPU6050_DMP6.ino example into the S-Funktion Builder but it doesn't even compile.
I'm getting errors like
...\test\I2Cdev.h(90) : error C2061: syntax error : identifier 'I2Cdev'
...\test\I2Cdev.h(90) : error C2059: syntax error : ';'
...\test\I2Cdev.h(90) : error C2449: found '{' at file scope (missing function header?)
...\test\I2Cdev.h(115) : error C2059: syntax error : '}'
but I haven't changed the files.
Running the ino-file in the Arduino IDE works fine, why not in Simulink?
Can anybody help me please?
Search the forum for simulations with the Arduino. It is often a problem. You better not even try to use a simulator.
The error message is that I2Cdev is not known. Did you install both the i2cdevlib and mpu6050 libraries ?
If you can compile it, I'm sure that the simulator runs into another problem.
Sorry but what do you mean with "better not even try to use a simulator" ?
I want to use the Arduino as a target for Simulink and I also have an older example which makes MPU6050 raw data available in Simulink.
If I don't make the I2Cdev.h available for the compiler (don't put it in the right folder), the error message is different.
I think that trying to make a simulator work, is a waste of time ]
There are a many problems with them.
I don't know about that error message. Perhaps the i2cdevlib has internal defines for different chips, and something goes wrong there.