Moderator

FMA sensor on 2.0 code - need reverse

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!

Join diydrones

Email me when people reply –

Replies

  • 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".
  • Hello Hooks,

    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!!
  • Moderator
    I didn't post that I use 2.0 code..
  • 3D Robotics
    You need to reverse your elevator servo. The line of code is in the first tab (set pitch to 1):

    #define REVERSE_ROLL 0 //To reverse servo roll
    #define REVERSE_PITCH 0 //To reverse servo pitch
This reply was deleted.

Activity

Gremsy liked Gremsy's profile
Mar 12
DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27, 2022
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24, 2022
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24, 2022
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24, 2022
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24, 2022
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20, 2022
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8, 2022
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23, 2022
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23, 2022
DIY Robocars via Twitter
Oct 23, 2022
DIY Robocars via Twitter
Oct 19, 2022
DIY Robocars via Twitter
Oct 18, 2022
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13, 2022
More…