Back to engineering archive

Record 033 / Lighting and interaction

Analog-keypad game-controller draft

An archived game-controller sketch reads a one-pin analog keypad, presents duration and relay-test menus, and tracks red, blue and neutral game states with display, light and sound feedback.

Archived firmware draft
Analog keypadI2C LCDNeoPixel APITimed game logicRelay test

Archived source flow

Selected archived game-controller paths. Analog input selects configuration or play. Configuration contains duration changes and a relay test. The domination routine tracks team and elapsed time, capture or neutralization attempts, feedback and game-over totals. Menu assignments and latched release flags remain defects; this is not a repaired or tested game.
Selected menu and domination-game paths from archived source. State-flag and release-handling defects remain; compilation and hardware operation are unverified. View diagram at full size

Technical notes

Input and menus

Analog ranges on A0 select up, down, select and cancel. The active code uses that one-pin interface; the matrix-keypad include is commented out. Configuration changes the game duration or runs a separate relay test.

Game state and feedback

The domination routine tracks neutral, red and blue states, hold-to-capture or neutralize attempts, elapsed possession time and end-of-game totals. An I2C LCD, indicator outputs, a NeoPixel strip and buzzer provide feedback. Relay writes belong to initialization and the test menu, not the game loop.

Unresolved state handling

Menu conditions assign true to flags instead of testing them. On release, the key becomes x while the release handler only clears select/cancel flags, so hold state can remain latched. Blocking effects, delays and recursive menu calls also need review. No repaired build or tested game result is claimed.

Engineering archiveArchive record

Project enquiries

Discuss your project.

Tell us what you’re developing and where you need engineering support.

Discuss your project