Tuesday, August 12, 2014

Adding on to code for opposite fin pair drive, fixing a MAJOR problem

Today I decided to fix the issue of opposite servo pairs actuating in opposite directions which would result in a uncontrolled spin and subsequent destruction of airframe. It only took a few modifications totaling in 10 additional lines of code. This site was extremely helpful in explaining the servo drive code for opposite servo pairs.

Null1.write(valNull);

Obfuscated = valNull;

Null2.write(180-valNull);

Obfuscated = valNull;


What this does is take the opposite servo and drive it 180 degrees in the opposite direction of the reference servo(1)[Yes I censored the code because this is ITAR regulated, Deal with it. If you really do want to take a look at my code, you will have to prove you are based in the US and sign a waiver that transfers all responsibility for what you may do with my code to you].



No comments:

Post a Comment