Before u ask yes i'm a freak'n newbee. I've played around with cut and paste and got some of my little projects to work. I need help getting started with writing Arduino code. My project is a Gyro and a X & Y accelerometer that control a servos position and speed.
//Some global variables go here
void setup()
{
// Some initialization stuff goes here
}
void loop()
{
// Read the inputs
// Calculate the output
// Send the output
}
HaHa Thats how simple i wish it was. let me explain my project a little more. 3 analog inputs 1 gyro "G" 2 accelerometers "Z" "X" control 1 servo output. the gyro sets the the nutral point of the servo and tells it how fast to move. Z & X are also used to help set the neutral state when not rotating. I have some code but??????
The problem is you can't start coding until you understand the problem you are trying to solve. Some call that the algorithm.
I can't help you with that, not up to speed with gyros and accelerometers and such. However if you could list steps needed in English or have a math formula, then coding it is pretty simple after that.