mirror of
https://github.com/speedypotato/Pocket-SDVX.git
synced 2026-09-22 22:38:11 +03:00
Added documentation, reduced startup delay
This commit is contained in:
@@ -9,7 +9,8 @@ iivxReport_t report;
|
||||
// 2000 = 500hz
|
||||
#define REPORT_DELAY 1000
|
||||
|
||||
int currMode = EEPROM.read(0); // Read eeprom address 0. Value stored indicated mode. Mode1=joystick, Mode2=keyboard.
|
||||
// Read eeprom address 0. Value stored indicated mode. Mode1=joystick, Mode2=keyboard.
|
||||
int currMode = EEPROM.read(0);
|
||||
|
||||
// Mouse Sens Multiplier
|
||||
#define MOUSE_MULT 3
|
||||
@@ -42,14 +43,14 @@ uint8_t buttonCount = 7;
|
||||
#define FX_L_LED 20
|
||||
#define FX_R_LED 21
|
||||
|
||||
//number of cycles before HID falls back to reactive
|
||||
// Number of cycles before HID falls back to reactive
|
||||
unsigned long reactiveTimeoutMax = 1000;
|
||||
unsigned long reactiveTimeoutCount = reactiveTimeoutMax;
|
||||
|
||||
uint8_t buttonPins[] = { BT_ST, BT_A, BT_B, BT_C, BT_D, FX_L, FX_R};
|
||||
uint8_t ledPins[] = { BT_ST_LED, BT_A_LED, BT_B_LED, BT_C_LED, BT_D_LED, FX_L_LED, FX_R_LED};
|
||||
uint8_t buttonPins[] = { BT_ST, BT_A, BT_B, BT_C, BT_D, FX_L, FX_R };
|
||||
uint8_t ledPins[] = { BT_ST_LED, BT_A_LED, BT_B_LED, BT_C_LED, BT_D_LED, FX_L_LED, FX_R_LED };
|
||||
|
||||
// encoder sensitivity = number of positions per rotation times 4 (24*4) / number of positions for HID report (256)
|
||||
// Encoder sensitivity = number of positions per rotation times 4 (24*4) / number of positions for HID report (256)
|
||||
#define ENCODER_SENSITIVITY (double) 0.375
|
||||
Encoder encL(3, 2), encR(1, 0);
|
||||
float knob1 = 0;
|
||||
@@ -68,7 +69,7 @@ void lights(uint8_t lightDesc) {
|
||||
}
|
||||
|
||||
void setup() {
|
||||
delay(1000);
|
||||
delay(500);
|
||||
|
||||
// Setup I/O for pins
|
||||
for (int i = 0; i < buttonCount; i++) {
|
||||
@@ -76,18 +77,18 @@ void setup() {
|
||||
pinMode(ledPins[i], OUTPUT);
|
||||
}
|
||||
|
||||
// startup mode
|
||||
// Startup mode
|
||||
int Button1State = digitalRead(BT_A); //Read Btn-A
|
||||
int Button2State = digitalRead(BT_B); //Read Btn-B
|
||||
// button 1 is held down: Joystick Mode
|
||||
// Button 1 is held down: Joystick Mode
|
||||
if (Button1State == LOW && Button2State == HIGH) {
|
||||
if (currMode != 1) { //if eeprom=2
|
||||
if (currMode != 1) {
|
||||
EEPROM.update(0, 1);
|
||||
delay(200);
|
||||
}
|
||||
} else if (Button2State == LOW && Button1State == HIGH) {
|
||||
// button 2 is held down: Keyboard Mode
|
||||
if (currMode != 2) { //if eeprom=1
|
||||
// Button 2 is held down: Keyboard Mode
|
||||
if (currMode != 2) {
|
||||
EEPROM.update(0, 2);
|
||||
delay(200);
|
||||
}
|
||||
@@ -103,14 +104,14 @@ void loop() {
|
||||
}
|
||||
|
||||
void keyboard_mode() {
|
||||
// read encoders
|
||||
// Read encoders
|
||||
knob1 = (float)(encL.read());
|
||||
knob2 = (float)encR.read();
|
||||
|
||||
if(knob1 != old_knob1) {
|
||||
Mouse.move((knob1 - old_knob1) * MOUSE_MULT, 0);
|
||||
|
||||
// we count the difference in the encoders, but we must not go over arduino's int limit
|
||||
// We count the difference in the encoders, but we must not go over arduino's int limit
|
||||
if(knob1 < -255 || knob1 > 255) {
|
||||
encL.write(0);
|
||||
old_knob1 = 0;
|
||||
@@ -130,7 +131,7 @@ void keyboard_mode() {
|
||||
}
|
||||
}
|
||||
|
||||
// read the buttons for low, if it's low, output a keyboard press
|
||||
// Read the buttons for low, if it's low, output a keyboard press
|
||||
if(digitalRead(BT_A) == LOW) {
|
||||
Keyboard.press(BIND_A);
|
||||
digitalWrite(BT_A_LED, HIGH);
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 699 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 584 KiB |
@@ -8,6 +8,7 @@ A mini controller for games such as Sound Voltex, USC, KShoot, osu 4k, etc. Bas
|
||||
## Features
|
||||
- Super small - About 7" x 4" and a little over 1/2" high (About 1-1/2" including knobs)
|
||||
- 7 Gateron Red Keyswitches (Start, BT-A, BT-B, BT-C, BT-D, FX-L, FX-R)
|
||||
- Reactive & HID LEDs
|
||||
- PBT G20 Keycaps
|
||||
- Quality Bourns Encoders (VOL-L, VOL-R)
|
||||
- Solid Aluminum Black 20mm Knobs
|
||||
@@ -22,9 +23,44 @@ A mini controller for games such as Sound Voltex, USC, KShoot, osu 4k, etc. Bas
|
||||
- A really low-quality video guide series I made at 4:00am: https://www.youtube.com/playlist?list=PLSlCMOwxujV7-DYrM4eC2Sb4_rMR5udEE .
|
||||
- Perhaps it will be useful to some of you.
|
||||
|
||||
## Parts Required:
|
||||
- 1x 3D Printed Case (1.2mm walls, top, bottom layers; 20-25% infill minimum)
|
||||
- 1x 3D Printed Cover
|
||||
- 1x layer1 Vinyl Skin [width is ~169mm (scale the skin proportionally)]
|
||||
- 1x layer2 Vinyl Skin [width is ~169mm (scale the skin proportionally)]
|
||||
- 1x cover Vinyl Skin [width is ~165mm (scale the skin proportionally)]
|
||||
- 7x Gateron Red Keyswitches (or other similar MX-style switch)
|
||||
- 2x Bourns PEC16-2015F-N0024 Encoders
|
||||
- 1x 1x1 G20 Keycap
|
||||
- 4x 1x1.25 G20 Keycap
|
||||
- 2x 1x2 G20 Keycap
|
||||
- 2x 20mm Diameter Solid Aluminum Knobs (20mm high used, 17-22mm height should work as well)
|
||||
- 1x Arduino Pro Micro
|
||||
- 6x Rubber Feet (0.8-1cm in diameter)
|
||||
- 1x Micro USB Male to USB C Female (27cm length)
|
||||
- 1x M3x5 Screw
|
||||
- Cat5e Cable (~2 feet, strip it open and take a twist of wire)
|
||||
- Hot Glue
|
||||
- Solder
|
||||
- USB C cable (preferably one with deep insertion)
|
||||
|
||||
## LED Parts Required:
|
||||
- 7x 2x3x4mm Square LEDs (choose your desired colors)
|
||||
- 7x Resistors (High brightness 100Ohm, Medium brightness 220Ohm)
|
||||
|
||||
## Recommended Tools/Etc.
|
||||
- Temperature Controlled Soldering Iron
|
||||
- Hot Glue Gun
|
||||
- Needle Nose Pliers
|
||||
- Phillips Screwdriver (if you use a phillips head M3 screw)
|
||||
- Allen Key (for knobs' grubscrew, M3 screw if you have a hex head)
|
||||
- Rubbing/Isopropyl Alcohol
|
||||
- Microfiber Cloth (for cleaning w/ alcohol)
|
||||
- Eye Protection + Safety Mask
|
||||
|
||||
## General Assembly Instructions
|
||||
- 3D print case and cover
|
||||
- Cut vinyls: layer1, layer2, cover_v2
|
||||
- 3D print case and cover.
|
||||
- Cut vinyls: layer1, layer2, cover_v2.
|
||||
- Weed vinyls(remove excess).
|
||||
- Clean face with rubbing/isopropyl alcohol and apply skin using transfer tape. Apply layer1, then layer2. Then apply cover.
|
||||
- Note: Shine a flashlight on the case's corner to more easily see where to line up the skin. I make my skins every so slightly smaller than the actual face for more leeway. The skin's width is ~169mm (scale the skin proportionally).
|
||||
@@ -38,8 +74,8 @@ A mini controller for games such as Sound Voltex, USC, KShoot, osu 4k, etc. Bas
|
||||
- Arduino Pro Micro Pinout
|
||||
- VOL-L A 2
|
||||
- VOL-L B 3
|
||||
- VOL_R A RXI
|
||||
- VOL_R B TXO
|
||||
- VOL_R A 0 (RXI)
|
||||
- VOL_R B 1 (TXO)
|
||||
- BT_ST 4
|
||||
- BT_A 5
|
||||
- BT_B 6
|
||||
@@ -58,41 +94,27 @@ A mini controller for games such as Sound Voltex, USC, KShoot, osu 4k, etc. Bas
|
||||
- Wipe circles on the bottom with rubbing/isopropyl alcohol. Apply adhesive rubber feet.
|
||||
- Mount keycaps. See video Part 8 for details.
|
||||
- Mount knobs. Use the arduino pin headers as a spacer on each side so the knobs are the same height and don't rub on the encoder nub.
|
||||
|
||||
## HID LED Assembly Instructions
|
||||
- Take off keycaps.
|
||||
- Insert LED through switch.
|
||||
- Solder negative(shorter) leg to the switch's leg that connects to ground/common. Clip LED shorter if needed.
|
||||
- Solder resistor(100 or 220 Ohm depending on desired brightness) to positive(longer) leg. Clip LED & resistor shorter if needed.
|
||||
- Solder other end of resistor to a wire. The other end of the wire will be soldered to the Arduino Pro Micro.
|
||||
- Arduino Pro Micro Pinout for LEDs
|
||||
- BT_ST_LED 16
|
||||
- BT_A_LED 14
|
||||
- BT_B_LED 15
|
||||
- BT_C_LED 18 (A0)
|
||||
- BT_D_LED 19 (A1)
|
||||
- FX_L_LED 20 (A2)
|
||||
- FX_R_LED 21 (A3)
|
||||
- Plug in your arduino and flash firmware if it needs to be updated.
|
||||
- Flatten cables and close cover.
|
||||
### Done. Enjoy!!
|
||||
|
||||

|
||||
|
||||
## Parts Required:
|
||||
- 1x 3D Printed Case (1.2mm walls, top, bottom layers; 20-25% infill minimum)
|
||||
- 1x 3D Printed Cover
|
||||
- 1x layer1 Vinyl Skin [width is ~169mm (scale the skin proportionally)]
|
||||
- 1x layer2 Vinyl Skin [width is ~169mm (scale the skin proportionally)]
|
||||
- 1x cover Vinyl Skin [width is ~165mm (scale the skin proportionally)]
|
||||
- 7x Gateron Red Keyswitches
|
||||
- 2x Bourns PEC16-2015F-N0024 Encoders
|
||||
- 1x 1x1 G20 Keycap
|
||||
- 4x 1x1.25 G20 Keycap
|
||||
- 2x 1x2 G20 Keycap
|
||||
- 2x 20mm Diameter Solid Aluminum Knobs (20mm high used, 17-22mm height should work as well)
|
||||
- 1x Arduino Pro Micro
|
||||
- 6x Rubber Feet (0.8-1cm in diameter)
|
||||
- 1x Micro USB Male to USB C Female (27cm length)
|
||||
- 1x M3x5 Screw
|
||||
- Cat5e Cable (~2 feet, strip it open and take a twist of wire)
|
||||
- Hot Glue
|
||||
- Solder
|
||||
- USB C cable (preferably one with deep insertion)
|
||||
|
||||
## Recommended Tools/Etc.
|
||||
- Temperature Controlled Soldering Iron
|
||||
- Hot Glue Gun
|
||||
- Needle Nose Pliers
|
||||
- Phillips Screwdriver (if you use a phillips head M3 screw)
|
||||
- Allen Key (for knobs' grubscrew, M3 screw if you have a hex head)
|
||||
- Rubbing/Isopropyl Alcohol
|
||||
- Microfiber Cloth (for cleaning w/ alcohol)
|
||||
- Eye Protection + Safety Mask
|
||||
|
||||
## Links I used to make the first batch of 10
|
||||
NOTE: Links dead? See /IMAGES/screenshots/ for an example of what you are looking for!
|
||||
- Gateron Red Keyswitches: https://kbdfans.com/collections/gateron-swithes/products/gateron-swtich-3pin-or-5pin?variant=35765199373
|
||||
@@ -105,7 +127,12 @@ NOTE: Links dead? See /IMAGES/screenshots/ for an example of what you are looki
|
||||
- Rubber Feet: https://www.ebay.com/itm/50PCS-Rubber-Feet-Clear-Semicircle-Bumpers-Door-Silicone-Buffer-Pad-Furniture/152925672374
|
||||
- Micro USB Male to USB C Female: https://www.aliexpress.com/item/32983342667.html
|
||||
- M3x5 Screw: https://www.ebay.com/itm/20X-M3-3-80mm-Round-Pan-Head-Phillips-Screws-304-Stainless-Steel-Machine-Screws/302237442873?
|
||||
- USB C cable (WARNING: CONTAINS 10): https://www.aliexpress.com/item/33032210292.html
|
||||
- USB C cable (WARNING: CONTAINS 10): https://www.aliexpress.com/item/33032210292.
|
||||
|
||||
## Links I used for LEDs
|
||||
NOTE: Links dead? See /IMAGES/screenshots/ for an example of what you are looking for!
|
||||
- 2x3x4mm LEDs: https://www.aliexpress.com/item/4000463652201.html
|
||||
- 100Ohm Resistors: https://www.ebay.com/itm/100PCS-1-4W-0-25W-Metal-Film-Resistor-1-Full-Range-of-Values-0%CE%A9-to-10M%CE%A9/252838503547
|
||||
|
||||
## Miscellaneous Info
|
||||
- The fancy looking knobs I used for Pocket SDVX #14: https://www.amazon.com/gp/product/B07PQ5H6MF/
|
||||
|
||||
Reference in New Issue
Block a user