Compare commits

..

No commits in common. "main" and "076d853529471d2109fd3ff76abee3dbc41c9588" have entirely different histories.

11 changed files with 57 additions and 15628 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,87 +0,0 @@
#include <Joystick.h>
#include <Matrix.h>
Joystick joystick;
// These defines match the board schematic
#define ENC1 2, 4
#define ENC2 3, 5
// Matrix defines
#define R0 6
#define R1 7
#define R2 8
#define R3 9
#define R4 10
#define C0 A3
#define C1 A2
#define C2 A1
#define C3 A0
#define BTN1 R0,C0
#define BTN2 R1,C0
#define BTN3 R2,C0
#define BTN4 R3,C0
#define BTN5 R4,C0
#define BTN6 R0,C1
#define BTN7 R1,C1
#define BTN8 R2,C1
#define BTN9 R3,C1
#define BTN10 R0,C2
#define BTN11 R1,C2
#define BTN12 R2,C2
#define BTN13 R3,C2
#define BTN14 R0,C3
#define BTN15 R1,C3
#define BTN16 R2,C3
#define BTN17 R3,C3
#define KBTN1 R4,C1
#define KBTN2 R4,C2
#define KBTN3 R4,C3
void setup() {
// Encoders
joystick.AddEncoder(ENC1, 4, ENCODER_PULSED_SPLIT);
joystick.AddEncoder(ENC2, 4, ENCODER_PULSED_SPLIT);
// We will add the 2-stage "key buttons" in a slightly odd order
// in order to keep columns together for faster scanning.
uint8_t columns[] = {C0, C1, C2, C3};
Matrix* matrix = new Matrix(columns, 4);
// Flight modes
joystick.AddMatrixButton(BTN1, matrix, BUTTON_PASSTHRU);
joystick.AddMatrixButton(BTN2, matrix, BUTTON_PASSTHRU);
joystick.AddMatrixButton(BTN3, matrix, BUTTON_PASSTHRU);
joystick.AddMatrixButton(BTN4, matrix, BUTTON_PASSTHRU);
// Lights and Doors
joystick.AddMatrixButton(BTN5, matrix, BUTTON_PULSED_DOUBLE_ACTION);
joystick.AddMatrixButton(BTN6, matrix, BUTTON_PULSED_DOUBLE_ACTION_SPLIT);
joystick.AddMatrixButton(BTN7, matrix, BUTTON_PULSED_DOUBLE_ACTION_SPLIT);
// Mining modules (plus first keybutton)
joystick.AddMatrixButton(BTN8, matrix, BUTTON_PASSTHRU);
joystick.AddMatrixButton(BTN9, matrix, BUTTON_PASSTHRU);
joystick.AddMatrixButton(KBTN1, matrix, BUTTON_PASSTHRU);
joystick.AddMatrixButton(BTN10, matrix, BUTTON_PASSTHRU);
// HUD modes
joystick.AddMatrixButton(BTN11, matrix, BUTTON_PASSTHRU);
joystick.AddMatrixButton(BTN12, matrix, BUTTON_PASSTHRU);
joystick.AddMatrixButton(BTN13, matrix, BUTTON_PASSTHRU);
// Flight modes (and latter 2 keybuttons)
joystick.AddMatrixButton(KBTN2, matrix, BUTTON_PASSTHRU);
joystick.AddMatrixButton(BTN14, matrix, BUTTON_PULSED_DOUBLE_ACTION_SPLIT);
joystick.AddMatrixButton(BTN15, matrix, BUTTON_PULSED_DOUBLE_ACTION_SPLIT);
joystick.AddMatrixButton(BTN16, matrix, BUTTON_PULSED_DOUBLE_ACTION_SPLIT);
joystick.AddMatrixButton(BTN17, matrix, BUTTON_PULSED_DOUBLE_ACTION_SPLIT);
joystick.AddMatrixButton(KBTN3, matrix, BUTTON_PASSTHRU);
joystick.Init();
}
void loop() {
joystick.Update();
}

View File

@ -0,0 +1,57 @@
#include <Joystick.h>
Joystick joystick(false);
void setup() {
// for (uint8_t i = 0; i < 14; i++) {
// joystick.AddButton(i, BUTTON_PASSTHRU);
// }
// joystick.AddButton(A0, BUTTON_PASSTHRU);
// joystick.AddButton(A1, BUTTON_PASSTHRU);
// joystick.AddButton(A2, BUTTON_PASSTHRU);
// joystick.AddButton(A3, BUTTON_PASSTHRU);
// joystick.AddButton(A4, BUTTON_PASSTHRU);
// joystick.AddButton(A5, BUTTON_PASSTHRU);
// // Power switches
joystick.AddButton(2, BUTTON_PULSED_DOUBLE_ACTION_SPLIT);
joystick.AddButton(3, BUTTON_PULSED_DOUBLE_ACTION_SPLIT);
joystick.AddButton(4, BUTTON_PULSED_DOUBLE_ACTION_SPLIT);
joystick.AddButton(5, BUTTON_PULSED_DOUBLE_ACTION_SPLIT);
// // HUD modes
joystick.AddButton(8, BUTTON_PASSTHRU);
joystick.AddButton(7, BUTTON_PASSTHRU);
joystick.AddButton(6, BUTTON_PASSTHRU);
// // Encoders
// // FIXME: these seem to be wired wrong.
// // joystick.AddEncoder(10, 11, ENCODER_PULSED_SPLIT);
// // joystick.AddEncoder(12, 13, ENCODER_PULSED_SPLIT);
// // Mining Modules
joystick.AddButton(9, BUTTON_PASSTHRU);
joystick.AddButton(10, BUTTON_PASSTHRU);
joystick.AddButton(11, BUTTON_PASSTHRU);
// // Flight Modes
joystick.AddButton(A1, BUTTON_PASSTHRU);
joystick.AddButton(A2, BUTTON_PASSTHRU);
joystick.AddButton(A3, BUTTON_PASSTHRU);
joystick.AddButton(A4, BUTTON_PASSTHRU);
// // Doors & Lights
// // TODO: Need multiplexer setup
joystick.AddButton(12, BUTTON_PULSED_DOUBLE_ACTION);
joystick.AddButton(A0, BUTTON_PULSED_DOUBLE_ACTION);
// // Emergency Panel
// // TODO: Need multiplexer setup
joystick.AddButton(A5, BUTTON_PASSTHRU);
joystick.Init();
}
void loop() {
joystick.Update();
}

View File

@ -1,21 +0,0 @@
# Flight Control Panel
When playing space and flight sims with a HOTAS or HOSAS, it's easy to run out of keybinds. This project is a "control panel" that acts as a standard USB joystick, expanding your button options without resorting to the keyboard. Extra immersive, feels good.
## Files
Contained in this directory are the Arduino sketch (which requires my [Arduino Joystick](https://git.annabunch.es/annabunches/arduino-joystick) library), Eagle files and PDF schematic for the custom "shield" PCB, and an Adobe Illustrator template for the panel's front profile. The `gallery/` directory contains work-in-progress and finished images of the project.
## Parts
List of parts used (part numbers included in case links expire):
* [Plastic Enclosure](https://www.amazon.com/gp/product/B07D23BF7Y/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) (LeMotech lm201805132201). Everything is, of course, dimensioned to this.
* [Arduino Uno Rev3](https://store-usa.arduino.cc/products/arduino-uno-rev3/?gclid=Cj0KCQiAkNiMBhCxARIsAIDDKNXaPb3K0y4hHG6RWk_sdPSYBskSyKtpu6v2ob8dHQ2mQLwbqx_UnqQaAn7IEALw_wcB).
* [Sparkfun 16-channel multiplexer breakout](https://www.sparkfun.com/products/9056), a 74HC4067 multiplexer on a little breakout board. If I were designing this again from scratch, I would get a through-hole mounted multiplexer without the breakout, since I ended up doing a custom PCB anyway.
* [Rotary Encoders](https://www.digikey.com/en/products/detail/cui-devices/ACZ16NBR1E-15FD1-12C/1923376) (CUI Devices ACZ16NBR1E-15FD1-12C) and [knobs](https://www.digikey.com/en/products/detail/kilo-international/OEJNI-75-2-7/5970389) (Kilo International OEJNI-75-2-7). These encoders are *weird*, with the common pin being on one of the ends instead of in the middle, as seems to be standard.
* [Square Pushbuttons](https://www.digikey.com/en/products/detail/cw-industries/GPB023A05BR/2235498) (CW Industries GPB023A05BR). These are a little stiff and actuate around halfway depressed. Not my favorite buttons ever.
* [Toggle Switches (top row)](https://www.digikey.com/en/products/detail/e-switch/100SP1T4B1M1QEH/378836) (E-Switch 100SP1T4B1M1QEH).
* [Toggle Switches (smaller ones)](https://www.amazon.com/gp/product/B016Q9X8AW/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) (Podoy 1U2166). Leftover from an old project.
* [Round pushbuttons](https://www.amazon.com/gp/product/B00HGAME6U/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) (Uxcell A13112100ux1077). Leftover from an old project.
* Tons of "dupont" 2.54mm pitch connectors, housings, and header pins, for example from [this kit](https://www.amazon.com/gp/product/B078RRPRQZ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1).

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

View File

@ -1,19 +0,0 @@
# Star Citizen Flight Control Panel
To increase immersion in Star Citizen, I designed this "control panel" that acts as a standard USB joystick, expanding your button options without resorting to the keyboard. Combine with a HOSAS and pedals for a decent amount of immersion without building a full simpit.
## Files
Contained in this directory you'll find several sub-directories (some of these are TBA):
* `code/` contains the Arduino sketch (which requires my [Arduino Joystick](https://git.annabunch.es/annabunches/arduino-joystick) library)
* `pcb/` has Eagle files for the custom PCB that connects directly to an Arduino.
* `decal/` has an Adobe Illustrator design for pasting to the front of the panel.
* `mockup/` has a Fusion 360 mockup of the panel, used to test the dimensions of all the components and ensure everything will fit.
* `gallery/` contains work-in-progress and finished images of the physical project.
## Parts
List of parts used (part numbers included in case links expire):
* TBA