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.

10 rem BUZZER PROGRAM
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. LEM

Jeff Adkins is a science teacher who isn't afraid to state his preferences in computing platforms. In his classroom he has everything from a beige All-in-One to a a G4 XServe, and they all work together nicely. He calls himself the "poster child for technology integration" in the classroom. He was the 2006 Outstanding Educator of the Year for the California Computer Using Educators (CUE) organization. He also maintains a site for astronomy teachers at www.AstronomyTeacher.com.

Recent Mac Lab Reports

Links for the Day

Recent Content on Low End Mac

Recent Deals

About LEM Support Usage Privacy Contact

Custom Search

Share

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

Low End Mac Reader Specials

Quantcast

TypeStyler 11 is now in the Mac App Store!! -- Special Introductory Price of $59.95!! -- To Buy From The Mac App Store Click Here Now!! Or buy direct from Strider Software.

Quantcast

Quantcast

Quantcast

Poker Mac Don't install Parallels to play poker online! Poker Mac will show you how to download and install a native Mac poker and Mac Casino applications in minutes.

Quantcast

Quantcast

Quantcast

Quantcast

Favorite Sites

MacSurfer
Cult of Mac
Shrine of Apple
MacInTouch
MyAppleMenu
InfoMac
The Mac Observer
Accelerate Your Mac
RetroMacCast
PB Central
MacWindows
The Vintage Mac Museum
DealMac
Deal Brothers
Mac2Sell
Mac Driver Museum
JAG's House
System 6 Heaven
System 7 Today
the pickle's Low-End Mac FAQ

Affiliates

Amazon.com
The Apple Store
The iTunes Store
PC Connection Express
GainSaver
Parallels Desktop for Mac
eBay

Low End Mac's Amazon.com store

Advertise

Open Link