98Views3Replies

Author Options:

Having problems with Arduino code for Self Balancing Robot Answered

Whenever I try to Compile this code

https://github.com/vu2aeo/Arduino/blob/master/BalanceBot2_PID_Control/BalanceBot2_PID_Control.ino

arduino gives me this error

E:\Balance Bot\BalanceBot2_PID_Control\BalanceBot2_PID_Control.ino: In function 'void setup()':

BalanceBot2_PID_Control:38: error: 'class MPU6050' has no member named 'Initialise'

   sensor1.Initialise();

           ^

E:\Balance Bot\BalanceBot2_PID_Control\BalanceBot2_PID_Control.ino: In function 'void loop()':

BalanceBot2_PID_Control:43: error: 'class MPU6050' has no member named 'Update'

   sensor1.Update();

Now when I also include this library which contains GetGyroReading, GetAccelerometerReading etc variable it again give me the same error. I am pretty new to arduino programming and is trying out some PID controls.

my_mpu_library:
https://github.com/vu2aeo/Ard-Class/blob/master/MY_MPU_6050/my_mpu_6050.h

BOmotorpair library:
https://github.com/vu2aeo/Ard-Class/blob/master/BOMotorPair/bomotorpair.h

Project I am following
https://bayesianadventures.wordpress.com/2013/10/27/balance-good-everything-good/comment-page-1/#comment-814

Discussions

Just to avoid you an endless amount of hassles:
1. Check which IDE versions are supported/suggested for your plugins and code - use the lowest version of all.
2. If in doubt download a bunch of versions, the 1.05 is always a good starting point.
3. Some code and plugins require a specific IDE version to compile correctly (assuming the code itself is otherwise fine).
This means before digging through the code to find some non-existing error it is best to compile with different IDE versions first.

For Arduino projects the latest IDE is not always the best choice and in some cases not even working ;)

0
user
iceng

1 year ago

Do you know what PID means ?