I attempted to change the value to Z axis as it is not used in any P3D axis assignments, but it seems that P3D only accepts Rz axis values which is assigned to the Rudder. Is there any known way to work around this without overriding the Y axis on the Elevator? I am implementing a Yoke controller as well which is obviously more important to functionality than the wing flaps slider.
Here is the code for the Arduino currently:
Code: Select all
#include "Joystick.h"
// 2 Buttons, No hats, X and Y axis, no Z axis, Rx, Ry, Rz, Rudder, Throttle, Brake, or Steering
Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,JOYSTICK_TYPE_JOYSTICK, 0, 0, false, true, false, false, false, false, false, false, false, false, false);
void setup() {
pinMode(A0, INPUT); //initialize potentiometer pin
Joystick.begin();
Joystick.setYAxisRange(321, 702); //range of potentiometer
}
void loop() {
// Y-Axis
int YAxis = analogRead(A0);
Joystick.setYAxis(YAxis);
// Serial.println(yAxis);
delay(50);
}