Go Down

Topic: 2 Wheel Balancing robot (NEED HELP!) (Read 1 time) previous topic - next topic

rave11

hi everyone! first of all i'm new here and new to this project we're making. We are making a 2 wheeled balancing robot, we're using stepper motors and adafruit motor shield. We are having bits of problems on how to test 2 steppers at the same time with different or similar results on either side, so i hope someone could send us codes or advices on how to test them. The most difficult part is our gyro the MPU 6050, it's not the product of arduino, the brand comes from SPARKFUN and that makes it more difficult for us on how to configure, use, calibrate, etc,. it since the details and tutorials on this little chip is really hard to find!  :'(  so please, if anyone can help us it would really be appreciated. If you could explain it to us step by step it would really be a life saver, and also if you samples of the codes, feel free to post it here. Thank you very much! God bless!  :D

StanD

I am sure Sparkfun will have documentation for the specific breakout board they sell. Either way, if you are looking for a fairly simple way to get data from the MPU6050 you should check out the I2Cdev library and sample code. Here is my write-up on getting it working, hope it helps:
http://42bots.com/tutorials/arduino-uno-and-the-invensense-mpu-6050-6dof-imu/

Arduino experiments, resources and hacks http://42bots.com

rave11

hi StanD! first of all thank you. I already tried that but when i test the MPU 6050 in the serial monitor, it says "MPU 6050 connection unsuccessful!", can you help me with this?

Dekapon_Meindes

What address do you have in your sketch for your MPU ? If your MPU AD0 is low, it has to be 0x68 and if it is high(pin tied to Vcc) it has to be 0x69

rave11

What address do you have in your sketch for your MPU ? If your MPU AD0 is low, it has to be 0x68 and if it is high(pin tied to Vcc) it has to be 0x69

uhm.,well sir i'm new to this so, really i don't know. What the meaning of AD0 and it's functions? and if I may, what do you mean by"if it is high(pin tied to Vcc)? sorry for the inconvenience sir i am just really a slow learner.

Dekapon_Meindes

What the meaning of AD0 and it's functions? and if I may, what do you mean by"if it is high(pin tied to Vcc)?
On you mpu circuit, you have a pin named "AD0", we need to know if it is connected on the breakout to Vcc or to the ground.
Could you try the exemple sketch from the arduino library ? (the library's name should be something like "MPU6050")

Go Up