I have one problem with the pre test- I installed the FMA sensor just like instruction. But when I point the nose down the pitch also going down.. so I need to reverse the settings. I'm using code 2.0 and not the new 2.1How to do?Please don't tell me to reverse the FMA sensor.Also having problem making the FMA sensor working first time, I can see other having the same problem. Find more videos like this on DIY Drones
You need to be a member of diydrones to add comments!
Hooks,
In the 2.0 code, try this:
Reverse IR sensor-old code-return constrain((int)(((infrared0-511)*90)/max_ir),-60,60);
new code-return -constrain((int)(((infrared0-511)*90)/max_ir),-60,60);
Reverse IR sensor pitch-old code-return -constrain((int)(((infrared1-511)*90)/max_ir),-60,60);
new code-return constrain((int)(((infrared1-511)*90)/max_ir),-60,60);
Just reverse the sign in front of "constrain".
Replies
In the 2.0 code, try this:
Reverse IR sensor-old code-return constrain((int)(((infrared0-511)*90)/max_ir),-60,60);
new code-return -constrain((int)(((infrared0-511)*90)/max_ir),-60,60);
Reverse IR sensor pitch-old code-return -constrain((int)(((infrared1-511)*90)/max_ir),-60,60);
new code-return constrain((int)(((infrared1-511)*90)/max_ir),-60,60);
Just reverse the sign in front of "constrain".
I was having a problem to with the settings in the new code. But Chris explaned what you must change is this topic:
http://www.diydrones.com/profiles/blogs/settings-you-can-change-in-the
Says whether a Z sensor is present or not. [Note: autopilot will not properly calibrate without one]
#define SENSOR_Z 1
[Says whether the FMA sensor is pointed forward or backwards]
#define REVERSE_X_SENSOR 1 //1 = cable behind, 0 = cable front
[If your servos are reversed set these to 1 instead]
#define REVERSE_ROLL 0 //To reverse servo roll
#define REVERSE_PITCH 0 //To reverse servo pitch
remember that 2.1 needs a Z sensor to work well!!
#define REVERSE_ROLL 0 //To reverse servo roll
#define REVERSE_PITCH 0 //To reverse servo pitch