How it works · 07 of 10

Two at once

A thumb between two directions can close both contacts, and a press while tilted closes the press and a direction. SIGNAL then settles between the two levels. Most pairs read as the higher push; up and left together read as a press that did not happen, and the press with up sits almost on a line.

Two joins on one wire

Two at once
Held together
Held
left + up
SIGNAL
200 of 1000
Reads as
press
A press that did not happen. Left and up together join SIGNAL to two points of the ladder at once, and the pair settles at 0.200 of VCC: between the press's level and left's, on the press's side of the line. The sketch reports the press. A diagonal up and to the left is the one move to keep off a menu's select button.

With two contacts closed, SIGNAL is joined to two points of the chain at once, and the resistors between them are shorted out. The reading settles somewhere between the two levels, and where depends on the pair.

What each pair a thumb can make reads, and what the sketches name it:

HeldOf VCCNamed
Up + right1000right
Right + down1000right
Down + left429down
Left + up200press
Press + up143up, 3 under the line
Press + left250left
Press + down400down
Press + right1000right

The press that did not happen

Most pairs come out as the higher push, and the other is simply lost. One does not: up and left together land between the press and left, on the press's side of the line. The sketch reports a press nobody made.

That matters in a menu, where the press is usually "select". A thumb that rolls from left to up on its way round the cap can select something. The sketch in one step per push waits for a steady reading, which filters a quick roll but not a held diagonal.

Opposites cannot

Up and down, or left and right, cannot close together: the stem cannot lean both ways. That leaves the eight pairs in the table, and only one of them is a surprise.

When it does not work

A diagonal up and to the left selects things.

Up and left together settle at 200 thousandths of VCC, which is on the press's side of the line at 227: the sketch sees a press. Nothing is wrong with the block. Keep select away from that diagonal, or ask for the press to be held longer than a roll of the thumb.

Can a sketch tell a diagonal from a single push?

Not reliably. Down and left together read 429 thousandths against down's 444, and the press with left 250 against left's 273: 15 to 23 thousandths apart, inside what resistor tolerance and noise can move. Treat the reading as the one push it is nearest.

Does the switch let two contacts close at all?

XUNPU's drawing does not say. Five-way switches of this build commonly allow a diagonal to touch two, and a press while tilting is easy to make. The book assumes it can happen and shows what it reads.

Where this goes next

Three wires and a sketch that names each push.

The first read →

Edit this page — content/books/five-direction-joystick/two-at-once.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

Five-Direction Joystick

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum →