Log in

View Full Version : Gyro program..


Luiz12
21-02-2012, 04:07
Hi after testing out our robot on a bridge I was wondering if there was a way to just simply press a button while were on the bridge to make the motors run foward and back until the gyro readings are zero. I currently have barely any experience in programing with labview so any examples or any help will do.

DominickC
21-02-2012, 04:16
Our mechanical and drive team wanted the exact same thing, however once we practiced at a local scrimmage, we found it's actually incredibly easy to balance with just a bit of practice.

As for actually coding something which does it automatically, I'd assume you'd use PID with the Gyro as well as the Accelerometer.

Luiz12
21-02-2012, 04:21
would that be something that would be incredible hard to program, I mean I don't even know what PID is.

DominickC
21-02-2012, 04:24
I've never gotten down into the nitty-gritty of PID, so I can't say either way with certainty, but it's in-built into LabView. Experiment with it, but I think you'll find it easier to balance manually, especially because a program like this can't take into account the weight/motion/position/acceleration of a second or even third bot on the bridge.

Luiz12
21-02-2012, 04:28
Because what we ended up finding out is that the robot is top heavy to one side so when we tried to balance it it would just roll off. I mean I truly am a rookie programmer so unless you gave me an example on how to do this I really don't know what to do...

Chiller
21-02-2012, 08:12
When your angle gets smaller reduce the motor speed because then it will just go back and fourth.