Arduino controlled rudder pedals

Just made myself a set of rudder pedals using my new 3d printer.
I’ve connected it via Arduino micro to my MSFS2020 flight sim, I am now having issues about where to apply the connections. I cannot centre the rudder and it only moves in one direction. The pedals use 10k pots, one for the rudder controls and one each for the toe brakes, any hints would be good? Will Post a picture in about an hour so you can get an idea about the physical device




1 Like

Have you run the Windows calibration?

Was this ever fixed? I’m considering doing this.

Have you managed to solve it yet?

Hi,

I turned my old Logitech pedals into rudders with Arduino. Here is my sketch, maybe it is still helpful for some.

Connect the two analogue pots to A0 and A1 on the board.

Use the joystick library
Initialize it with only one Z axis. The digital range is 0-255, 127 is middle.
Read the A0 and A1 analogue values into ‘t’ and ‘b’.
Map the values opposite b:127-0 t:0-127
Calculate the delta between the pedal positions.
Adjust centre position value with delta.
send it
Reset centre to 127.

// Logitech MOMO Pedal Controller
// Use with Arduino Leonardo or ProMicro.
// Install Joystick library

// ZZZCS
//
#include <Joystick.h>

Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,
JOYSTICK_TYPE_JOYSTICK, 0, 0,
false, false, true,
false, false, false,
false, false, false, false, false);

int t = 0;
int b = 0;
int d = 0;
int z = 127;

const bool initAutoSendState = true;

void setup()
{
Joystick.begin();

}

void loop(){

t = analogRead(A0);
b = analogRead(A1);

t = map(t,0,1023,127,0);
b = map(b,0,1023,0,127);
d = t - b;

z = z + d;

// Serial.print("Throttle = ");
// Serial.print(t);

//Serial.print(" Brake = ");
// Serial.print(b);

//Serial.print(" Delta = ");
// Serial.print(d);

//Serial.print(" Zvalue = ");
//Serial.println(z);

// Joystick.setRzAxis(z);
Joystick.setZAxis(z);

z = 127;

// Joystick.setRzAxis(RzAxis_);

delay (50);
}

//AMSTUDIO Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.