I am trying to make a balancing robot

Hi
I am trying to make a balancing robot using the arduino and a memsic 2125. I am new to the whole arduino coding thing so I was wondering if anybody had a code that I could use.

Please reply

Quick Google search came up with this:

http://blog.makezine.com/archive/2009/04/how-to_tuesday_arduino_101_accelero.html

These things are really cool, I can't help you much because I just finished building a budget balancing robot using optical sensors.

You basically need to look at PID control. While I am not sure exactly what code is available for the Arduino, I can tell you that any PID algorithm from a PIC or even another microcontroller should help, provided of course that you port it to the Arduino C dialect.

Another thing you may want to look at it is Kalman Filtering, I didnt use it but I looked at it. It can get rather mathematical though.

Its best to write your own code then you learn. PID code isn't too bad and can actually be rather simple to implement once you get the hang of it.

I will post more later.