|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Hi im a programmer on team 2611 and we are thinking of using the built-in accelerometer on the RoboRio to make are bot drive straight, but we have no idea how to do that. I have been looking all over the internet and the example codes, and nothing can someone help us.
|
|
#2
|
|||
|
|||
|
Re: RoboRio Accelerometer
It would be easier to help if you gave more feedback about which programming language your team is using. This is a link to the WPI tutorials for accelerometers. The built in about half way down the page.
https://wpilib.screenstepslive.com/s...eter_interface |
|
#3
|
|||
|
|||
|
Re: RoboRio Accelerometer
We are using labview
|
|
#4
|
|||||
|
|||||
|
Re: RoboRio Accelerometer
I can't think of any way to use accelerometer information to control the robot's direction. You'd need something that can measure turning, like a gyro (yaw rate sensor) or wheel encoders on the left and right sides of the robot.
|
|
#5
|
|||
|
|||
|
Re: RoboRio Accelerometer
If your goal is to drive straight, you may find it easier to accomplish using a gyro or wheel encoders.
An accelerometer will give you translational forces, and depending on where the gyro is mounted, you may be able to calculate rotational forces from that. Also, if the robot tilts, gravity's effect will show up on the X and Y axes and appear as a translational force. So while using the accelerometer may provide some data to improve your robot's ability to drive straight, it may not be the most direct route. Greg McKaskle |
|
#6
|
|||
|
|||
|
Re: RoboRio Accelerometer
Ok thanks. We were trying to save space in the electrical box but I guess we will have to use a gyro. Thanks again.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|