Queens, New York
Online
Edison Member
Karma: 28
Posts: 1561
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #1 on: December 26, 2012, 03:48:47 pm » |
What do you mean by absolute orientation, the accelerometer and gyro output a range of numbers. This range is based on the position the accel / gyro is in, if it is tilted 45 deg, then you will get a number like 564. It does not output exact degrees unless you have a high end model, or do it yourself with a map function.
Degrees = map(value_gotten, lowest, highest, -90,90);
If your using the accel to get your values, then you may also want to contrain the lowest and highest values.
constrain(value_gotten, your_set_lowest, your_set_highest); This would go before the map, not after.
|
|
|
|
|
Logged
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino
Arduino Tutorials, coming soon.
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|