u/NorthWin763

Is there a PCB/perfboard that allows button layouts other than straight rows? Looking for cross/diamond pattern

Hi reddit,

I'm working on a custom controller project (Arduino Pro Micro, joystick + buttons) and currently prototyping on a breadboard. The breadboard forces all buttons into straight, parallel rows, which is fine for testing but not ideal for the final because i want to arrange four tactile buttons in a cross or diamond pattern (like NES or SNES layout) not just side by side in a line.

I have considered just adjusting my layout to have the buttons in a straight line but im not too satisfied with that idea.

Now my question is:

Is there a specific type of prototyping board that allows off-grid button placement? So that I can place buttons at 45° angles? Or Is there a trick to mount buttons diagonally on regular stripboard without shorting things out?

Thanks for any recommendations!

reddit.com
u/NorthWin763 — 1 day ago
▲ 3 r/ArduinoHelp+1 crossposts

Joystick on Pro Micro moves mouse too fast / jumps – how to smooth relative movement?

Hi reddit,

I'm building a custom controller for a school project. I have an Arduino Pro Micro (ATmega32U4) with a dual-axis analog joystick (KY-023) and four tactile buttons that will be soldered onto a perfboard (currently still on the breadboard to try out which makes it more difficult to determine whether the problem lies in the code or the wiring). The goal is to use the joystick to control the mouse cursor (relative movement) to demonstrate different input strengths.

What I've already done:

  • The joystick is wired to A0 (X-axis) and A1 (Y-axis), both with 5V and GND.
  • Buttons are wired as digital inputs with internal pullups enabled.
  • I wrote a basic sketch that reads analog values, maps them, and calls Mouse.move(x, y).

What actually happens:

  • The cursor moves, but it feels "jumpy" and too fast, even with small joystick deflections.
  • There is also slight cursor drift when the joystick is physically centered.

What I expected:
Smooth, proportional movement – small joystick tilt → slow cursor movement, full tilt → faster movement.

I suspect the linear mapping plus the fixed delay is the problem. I've read about using acceleration curves (e.g., exponential) but I'm unsure how to implement one without introducing lag. Could someone point me to an example or explain how to apply a non-linear curve to the mapped values before calling Mouse.move()?

Thank you for any hints.

Here is my current code (just for the joystick im trying to keep it as simple as possible so i can understand what i actually did)

#include <Mouse.h>

int xAxis = A0;

int yAxis = A1;

int deadzone = 10;

void setup() {

Mouse.begin();

Serial.begin(9600);

}

void loop() {

int xRaw = analogRead(xAxis);

int yRaw = analogRead(yAxis);

int xMove = map(xRaw, 0, 1023, -10, 10);

int yMove = map(yRaw, 0, 1023, -10, 10);

if (abs(xMove) < deadzone) xMove = 0;

if (abs(yMove) < deadzone) yMove = 0;

Mouse.move(xMove, yMove);

delay(10);

}

reddit.com
u/NorthWin763 — 1 day ago