Skip to content

Instantly share code, notes, and snippets.

Avatar

Tuomas Kuosmanen tigert

  • Helsinki, Finland
View GitHub Profile
View deluxe_throttle.ino
// This is a remix of USB joystick sketch by Mark Bennett at the arduino hub:
// https://create.arduino.cc/projecthub/markbennettuk/throttle-quadrant-and-trim-wheel-d746e8
// I use the Encoder library for my pitch trim wheel, limit the encoder internal counter to
// 0 to 1023 range in a crude way, and set that as the value for the trim axis.
//
// Update: read the potentiometer values three times to stabilize them a bit.
// Apparently there is a capacitor on the arduino that is shared by all
// analog input pins. This takes a short moment to recharge when you
// read another analog pin with a different voltage, thus the potentiometers
// were interfering with each other a bit. Doing a read (select the pin!),
View flight_sim_throttle_joystick
// This is a remix of USB joystick sketch by Mark Bennett at the arduino hub:
// https://create.arduino.cc/projecthub/markbennettuk/throttle-quadrant-and-trim-wheel-d746e8
// I use the Encoder library for my pitch trim wheel, limit the encoder internal counter to
// 0 to 1023 range in a crude way, and set that as the value for the trim axis.
//
// Update: read the potentiometer values three times to stabilize them a bit.
// Apparently there is a capacitor on the arduino that is shared by all
// analog input pins. This takes a short moment to recharge when you
// read another analog pin with a different voltage, thus the potentiometers
// were interfering with each other a bit. Doing a read (select the pin!),
@tigert
tigert / 3d-printed-throttle.ino
Last active Nov 15, 2020
USB HID Flight Simulator throttle and trim wheel using Arduino Pro Micro
View 3d-printed-throttle.ino
// This is a remix of USB joystick sketch by Mark Bennett at the arduino hub:
// https://create.arduino.cc/projecthub/markbennettuk/throttle-quadrant-and-trim-wheel-d746e8
// I just include the Encoder library for my pitch trim wheel, and
// compare the encoder values during the loop, and spew out 10 button
// click events for each encoder pulse (because MS Flight Simulator 2020
// currently has ridiculously slow trim wheel input)
//
// Update: read the potentiometer values three times to stabilize them a bit.
// Apparently there is a capacitor on the arduino that is shared by all
// analog input pins. This takes a short moment to recharge when you