Mac Lab Report

Turn Any Old Mac into a Gameshow Buzzer

- 2006.10.07

Occasionally I have students play games simulating game shows to review for tests. I've played a "Millionaire" game and a "Jeopardy" game.

One problem I always face is determining who gets to answer when "buzzing in" is required. Usually, I just let people raise their hands; but this year, I have unusually large classes (~40 students) who happen to be very chatty and, let us say, overly enthusiastic.

I mean these kids are into the competitive aspect of even a little review game . . . they are on their feet, yelling, laughing, etc. Consequently it was difficult to tell who raised their hands first and accusations of "No, we were first!" were flying.

I figured there had to be a technological way out of this conundrum without buying a video-game style "buzzer" kit from some overpriced vendor, so I tried to think of how I could put one of the several older Mac G3s in my room to use in this respect.

There was an astounding lack of shareware for this purpose, according to a brief Google search, so I decided to grow my own.

Despite the lack of a prefabricated solution, I knew two things that might help me:

  • There is a fine, functional version of BASIC for OS X that I know how to use - Chipmunk Basic.
  • You can hook up two ADB keyboards to a Power Mac G3 simultaneously, and they will both function. The Blue and White G3 was the last computer Apple manufactured that could use an ADB keyboard, and I happen to have a crate of these in a storeroom just looking for a purpose.

I proceeded to write a short program in Chipmunk Basic (source code follows) that basically captures the first keypress on both keyboards with an old-fashioned INKEY$ command and then displays this response as well as speaking it.

Players wait with one finger above one of the four keys I programmed (A, B, G, and D for alpha, beta, gamma, and delta) and the first one who "buzzes in" wins. Then the BASIC routine reports the winner and awaits a reset. The reset (your have to type the R key) is necessary so that the computer pauses, latching in the winning response before the keyboard is ready to accept another round.

In subsequent tests, the system worked like a charm.

In case you are a teacher and are wondering how I managed the students who weren't playing, I split the class up into four teams of ten students. Every time a student answered a question in the game, they rotated out with other team members, and a different student manned the keyboard. "Chaos," as one student described my earlier attempts, became "organized."

Another said that they had played "Jeopardy" in other classes, but this was the first one that was organized enough that they could enjoy it and get some information for reviewing out of it at the same time.

Here is the source code for my primitive "buzzer" program. Just download Chipmunk BASIC, install it on your older machine, connect two keyboards, and run the program. Just open Chipmunk Basic, copy the text below, and paste it in. Then run it. Don't forget to save it if it works well.

20 print "WAITING FOR INPUT..."
30 z$ = inkey$
40 if z$ = "a" or z$ = "A" then team$ = "ALPHA" : flag = 1
50 if z$ = "b" or z$ = "B" then team$ = "BETA" : flag = 1
60 if z$ = "G" or z$ = "g" then team$ = "GAMMA" : flag = 1
70 if z$ = "D" or z$ = "d" then team$ = "DELTA" : flag = 1
80 if z$ = "q" then stop
90 if flag = 1 then goto 110 else goto 30
110 a$ = "Team "+team$+" BUZZED IN FIRST!"
120 say a$ : print a$ : print "Type 'R' to reset for another round."
130 x$ = inkey$
140 if x$ = "R" or x$ = "r" then flag = 0 : goto 10
150 if x$ = "Q" or x$ = "q" then stop
160 goto 130

One last thing (gentle readers): I have homework for you.

  1. If you try this out on a 68K Mac, will it work? (Chipmunk Basic is available in versions for System 6, 7, 8, and 9 as well as OS X.)
  2. Will it work with USB keyboards on a modern Mac? [Editor's note: It works on my Power Mac G4 with a wireless keyboard connected via USB. dk]
  3. Does the "INKEY$" function have any inherent bias for some keypresses happening before others?
  4. Is there some way to distinguish between keyboards so we could use four separate keyboards with everyone pressing the space bar to trigger the answer?

That's it for this week. Sorry about my absence for the last while, I've been pretty busy with a number of projects.

Join us on Facebook, follow us on Twitter or Google+, or subscribe to our RSS news feed

is a longtime Mac user. He was using digital sensors on Apple II computers in the 1980's and has networked computers in his classroom since before the internet existed. In 2006 he was selected at the California Computer Using Educator's teacher of the year. His students have used NASA space probes and regularly participate in piloting new materials for NASA. He is the author of two books and numerous articles and scientific papers. He currently teaches astronomy and physics in California, where he lives with his twin sons, Jony and Ben.< And there's still a Mac G3 in his classroom which finds occasional use.

Today's Links

Recent Content

About LEM Support Usage Privacy Contact

Custom Search

Follow Low End Mac on Twitter
Join Low End Mac on Facebook

Favorite Sites

Cult of Mac
Shrine of Apple
The Mac Observer
Accelerate Your Mac
The Vintage Mac Museum
Deal Brothers
Mac Driver Museum
JAG's House
System 6 Heaven
System 7 Today
the pickle's Low-End Mac FAQ

The iTunes Store
PC Connection Express
Macgo Blu-ray Player
Parallels Desktop for Mac

Low End Mac's store


Open Link