1 / 10
Redesigned (Hearty) Single 2k Potentiometer Rudder Pedals — zdjęcie 1
1 / 10

Redesigned (Hearty) Single 2k Potentiometer Rudder Pedals

Zamów wydruk tego modelu

Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.

Zapisane na tym urządzeniu.

A Single potentiometer set of rudder pedals. Minimal hardware.

Ocena
0 / 5
Polubienia
4
Pobrania
36
Wydruki
0
Wyświetlenia
339
Oceny
0

Aktualizacja u źródła:

Informacje o modelu

Źródło
Printables
Kategoria
Video Games
Licencja
Creative Commons — Attribution

Uses a single Leonardo Pro Micro (Arduino) board for control, and a Single 2k Potentiometer. (5 and 10k should also work but code will need more adjustment)
V------------------------------------------CODE----------------------------------------------V
Starts HERE ----> #include // Reference the Joystick Library.

// Create Joystick
Joystick_ Joystick;

//unsigned int xAxis = 0;
//unsigned int yAxis = 0;
unsigned int zAxis = 0;

// Set "initAutoSendState" to true for "Auto Send" mode or false for "Manual Send" mode.

const bool initAutoSendState = true;
//const bool testAutoState = false;

void setup() {

Joystick.begin();

}

void loop() {
//xAxis = analogRead(A0)/4;
//xAxis = map(xAxis,0,255,-127,127);
//yAxis = analogRead(A1)/4;
//yAxis = map(yAxis,0,255,-127,127);
zAxis = analogRead(A0)*3;
zAxis = map(zAxis,0,131072,-65536,65536);

//Joystick.setXAxis(xAxis);
//Joystick.setYAxis(yAxis);
Joystick.setZAxis(zAxis);
delay(50);
//Joystick.setState(); // this updates the "Joystick" library and
// therefore your computer of all the current
// joystick and button states determined above
// all at once. YOU ONLY NEED TO USE THIS LINE
// IF const bool initAutoSendState = FALSE (the
// code for initAutoSendState is a few lines
// above the "setup" section of code)
} <------ Ends HERE
^------------------------------------------CODE----------------------------------------------^
(Code is hard to copy here. Copy all code from Starts Here ------> To <------Ends HERE to Arduino and Verify.)
Be SURE to get joystick.h from GitHub.
NOT through the IDE Library extension browser. That one will NOT work. GitHub one is correct and the Sketch should verify.
If you get ODD results when moving the Potentiometer, open USB Game controller in Windows, and select "Raw Data" checkbox. It will show you the numerical range coming out of your potentiometer. Adjust code accordingly.

Potentiometer (Or similar) - x1
https://www.amazon.com/TWTADE-Potentiometer-Single-Variable-Aluminum/dp/B0892QL2YM/ref=sr_1_8?crid=UBKNL9VA51YO&dib=eyJ2IjoiMSJ9.7ODCxElN_Ev4B3Y5XhqvLbUZiI6N1AEVhkKXb1swW0HSWtjrMGZ0CgA2OM1kJZq0paERQ0jNq3DDh-3OEjq2XxIqBj8PPw-rJjs63CSZsa_HH9k7YA7rRZUpDZsjajXpRLZuI94Z_AXRiKP-Ehi-rAMb7DzTaPpkfH6po0H8CtxPy7bbyYsh3nSqg_MiEoOg1rsW6LXVIfPXGw5zJbLNRO4bdsVotxHs2W5npYHAIZ0.W_MVw9qGzEc5M1uW_FskNeX5JWnf4oIGy967RScgdXE&dib_tag=se&keywords=2k%2Blinear%2BPotentiometer&qid=1760046298&sprefix=2k%2Blinear%2Bpotentiometer%2Caps%2C132&sr=8-8&th=1

Arduino (Or Similar) - x1
https://www.amazon.com/KOOKYE-ATmega32U4-Arduino-Leonardo-ATmega328/dp/B01HCXMBOU/ref=sr_1_2_sspa?crid=UDCFDXOK8P2Z&dib=eyJ2IjoiMSJ9.7Imnts2LStGHrb10m_jYpKbFOp-JXUaTxojUsf3GznsfoIQwxJVWeYc3Ba6GhLjjBcQz80H8pYjQNAXJ4D_fyMIWcDSY2tGL14ggCSkufDX2g7rG5dEtJMcnqW2W04uMKZHUAYMg5-HHSdTKbP6rxadE4aY8_QS1cSc_2hTNrGPLomwLy9OET7nZ0XyMseS0dJsCxKzO6-mFXkq-enyEsxS_QhofsVof9BK3qq8oZtQ.ZfGvdBaYhiWzcq3_rzaflxv7yra0aMjEoIvscPieG54&dib_tag=se&keywords=leonardo%2Bpro%2Bmicro&qid=1760046401&sprefix=lepnardo%2Bpro%2Bmicro%2Caps%2C141&sr=8-2-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9hdGY&th=1

I used a large bolt and a Nylock and washers to make an "Axle" for the Yoke and let it poking through about 1/2" Then attached a section of silicone tube to it.
From the bottom, slide the potentiometer into place and into the other end of the silicon tube. Tighten with small Zip ties or Glue into place.
Make sure you have the unit soldered together, programmed, and have center figured out BEFORE you set the Potentiometer into final position and glue into place.
You the multiply or divide *3 or /4 to adjust the throw of the potentiometer. Using USB game controller settings in Windows, determine the position the Potentiometer and the code need to be in, to allow the yoke to take the Z-axis in game controller settings from 0-100%
If its not, keep adjusting until it IS. Then lock it down and glue the knurled end into your tubing. The bolt / yoke moving should turn the potentiometer without much effort.
To adjust mine, I stuffed a tiny screw into the split in the knurled knob end of the potentiometer to hold it while tuning. Then hot glued the tube into place once my 0-100% was set.
The silicone tubing prevents damage to the Potentiometer during aggressive play by allowing it to give if moved past 100% or 0% marks.

This is technically a "Remix" but was totally redesigned to be more hearty and to hold up better for longer.

The total build cost should be less than 20$ if you source your parts well.
I couldn't see spending 130$ for Pedals alone.
So, here is to saving money! ;-D

Enjoy!

Designed for use with:
https://www.thingiverse.com/thing:7167011

Tagi