78Views2Replies

# 21 game Answered

In the late '50's Popular Electronics magazine (out of print) published an article "building a rudimentary computer" It was called the Challenger. It was a circuit that could play the old parlor game of "21", and utilized a mechanical stepping relay to do the "computing". There was a series of 21 pilot lamps, with a 'player' and 'machine' pushbuttons. The player, and the machine, in turn, could light 1, 2, or 3 lamps, with the object being to avoid lighting the last, or 21st lamp. The machine would invariably win. The secret is that within the number 21 there are five groups of 4, with one left over. Whatever number the player selects, (1, 2, or 3) the machine then selects a number that, when added to the players choice, totals 4. (player 1, mach. 3 / player 2, mach 2/ player 3, mach. 1) It would seem that today's processors and LED's, could handle this task easily. Would you, or someone you know, be interested in designing such a circuit as a project? I built it back then but I'm afraid my knowledge is stuck back in that time and would need instructions remenicient of that era.

## Discussions

The easiest way to do this would be with an Arduino microcontroller and a few shift registers. The Arduino would "listen" to the button presses, do a little bit of math, and then send a few bits out to the shift registers (which are daisy chained together) and light up the LEDs. You would then have the Arduino keep track of when you exceeded 21, pick a winner, and reset.

You can learn about Arduinos here:
https://www.instructables.com/class/Arduino-Class/

I wish they still made mechanical stepping relays. I could have some fun with those. :)

Also, albeit a bit inelegant, you can get an Arduino Mega and have enough I/O pins not to need the shift registers at all. Basically, connect 21 LEDs (and resistors) to 21 pins, and wire up some switches as inputs.