A pic of our election maps up on a big projector taken from one of our POLITICO reporters on the scene at the Haley headquarters. Haley (R) went on to win the South Carolina GOP runoff that evening.

Using Buzz! wireless buzzers with Windows

POLITICO was one of the major sponsors at this year’s Komen Race for the Cure. We wanted to do something fun and interesting to attract people to the booth and came up with the idea to have a simple, quick, political quiz game people could play before receiving our awesome incredible swag. I put together a simple quiz game in Flash and thought it would be great to have wireless “buzzers” for two people to answer with competitively.

So if you currently own one of the many Buzz! branded games with wireless buzzers for the PS3, and you want to make your own PC-based quiz game…here’s how to do it!

First you need to get the buzzers working as standard game controllers on a PC. Then we’ll map those buttons to keyboard keys. From there you can use the devices just as you would a normal keyboard – in my case, via Flash. This process was tested successfully on WinXP SP3, Vista, and Windows7. There’s a way to do this on OSX as well, but I won’t vouch for it.

You’ll first need to download two simple programs. Joy2Key and SimpleHIDWrite.

1) Plug the USB Buzz! reciever into your PC.
2) Wait for it…
3) Windows should automatically install a driver labelled WBuzz. It’ll show up in your Game Controllers Control Panel, but nothing will work just yet.
4) Sync each of the buzzers you’ll be using. This is done the same way you would on the PS3. Turn on each buzzer. Wait a second or two. Then hold the power button up for 4-seconds. The blue light at the bottom of the buzzer will come on and hold blue. While its on, press and hold the small button on the USB receiver for four seconds. The controller and the receiver’s lights should blink eight times confirming that they’ve been synced. Repeat this for each buzzer you want to use. I found that sometimes, after doing the first buzzer, each buzzer I turned on afterwards would automatically sync.
5) Run SimpleHIDWrite.
6) Select WBuzz in the top portion of the application.
7) Fill each of the boxes at the very bottom of the application with zeros – I don’t believe zeros in the “ReportID” box is needed.
8 ) Click the Write button – this sends a control signal that “activates” the buzzers. You should see all of the synced buzzers blink.
9) Press some buzzer buttons. You should see events logged for each button press in the bottom portion of the HID application.
10) In the Game Controllers Control Panel, click WBuzz, then click properties. Pressing the buttons on the buzzers should light up the appropriate buttons in the control panel. These are joystick buttons that you can now map to any program you want. Note that there are enough buttons for up to four buzzers per USB receiver.
11) Write down each joystick button number and what they are mapped to on each of the Buzz buzzers.
12) Write up a simple piece of Flash that accepts keyboard commands.
13) Now run Joy2Key.
14) Double-click a joystick button, tap a key on the keyboard that you want to assign, and click OK.
15) Run the Flash game you’ve made and tap away on the buzzers. You should now be seeing real working results!
16) Save your profile in Joy2Key. It will become the default settings the next time you run it. You’ll otherwise lose all of the mapped settings when you close the program.

Troubleshooting:
– I learned the hard way that when a computer returns from standby, you have to turn off all of the buzzers, turn them back on, and then resend the control signal from HID.
– If the buzzers are synced and the control signal has been sent, you should see the button presses being logged in HID. Its a good feeling when you do.
– If the Game Controller Control Panel is not actually the top focused window, you won’t see the buttons being pressed. i.e. you have to physically click on the panel in order to see the button presses. Why? Ask Microsoft.

Here’s some pics from the booth!

POLITICO 2010 Coverage

After endless, uncountable hours, the POLITICO 2010 Election Maps are finally available. Keep coming back for each primary throughout the year to see live results. This was a huge project for me and I’m just really really glad its over, and at the same time, looking forward to what’s next. Enjoy!
http://www.politico.com/2010/maps/

Craziness with the JSFL API

Little known fact – JSFL is awesome. Unfortunately, its also a bit buggy and is not entirely straightforward.
For those who don’t know, the JSFL API (Javascript Flash API), included with the Flash IDE, allows you to script *almost* anything you would normally do manually in Flash. Click here, change that option, change this color, [...]

Redispatching custom events

If you didn’t know already, its very important to always clone any custom events you create. Otherwise, when redispatching an event, it won’t be typed correctly and will use the default Event class’ properties. Meaning any data or event type you might’ve been passing along will be lost in the redispatch.
Another slight annoyance however is [...]

Protecting who can embed your SWF

While most video players nowadays are all about the “Share” button, sometimes you want to keep a SWF as protected as possible. Obviously password protecting it is an easy method, but what if you want the world to view your SWF, but not allow just anyone to embed it?
I’ve found a fairly simple solution [...]