It had to happen, someone has finally mass produced the IR pen so that you can use your Wiimote as an interactive whiteboard. You can buy an IR pen from http://penteractive.us/ for about $8. I sure hope Johnny Chung Lee is getting a cut of this action. Of course if you want to make your own then read my blog posting about making your own IR pen.
Penteractive also sell stands, which makes setting up the Wiimote whiteboard so much easier! Speaking of which, check out IDEO’s multitouch system (at code.google.com) which also supports the Wiimote and IR pen interaction.
I am excited about all this because it makes a Mingle projected story wall so much easier to setup and interact with.
My previous attempt at building a simple IR pen did not work as expected. The power source was too weak for the IR LED, and consequently the Wiimote had difficulty detecting the IR light.
For my second attempt I purchased an IR LED, some wire, a momentary switch, a 10 Ohm resistor, and a battery holder for two AA batteries. I also had a whiteboard marker lying around, which I used to create the casing for the IR pen.
I wired up the circuit so that the IR LED was in serial with the switch, resistor and battery holder. I then cut off the nozzle from the whiteboard marker casing. I needed space to fit the switch, so I cut the cylinder shaped casing in half, and drilled a hole to push the switch through. I then popped the LED through the nozzle, and wrapped the casing around the circuit. Everything was then held in place using electrical tape. It was a prototype, so I didn’t bother with aesthetics, which the rubber band holding the pen and battery holder together clearly shows.
I am glad to report that this particular IR pen works perfectly with my laptop screen and the Wiimote. However, I will need to test it out on a projected image from a data projector before officially giving the thumbs up.
My previous foray into using a Wiimote with my laptop led me down the path of building a USB sensor bar so that I can use the Wiimote to control the pointer movements. This approach worked better than expected, but it doesn’t work so well if you want finer control of your mouse pointer. For example, when I was demonstrating the Wiimote integration with my laptop I was quite nervous about the demo not working, and this was made apparent by the shaky lines that I was drawing with the Mouse Gestures. As a result some of the Mouse Gestures did not register.
A better approach would be to do what Johnny Lee did with the Wiimote to create the Wiimote Whiteboard. Johnny Lee used the Wiimote as an IR camera pointed at a projector screen, and created a pen with an LED which the Wiimote can track. This approach provides for more accuracy and smoother movements of the pointer.
The barrier of entry to the Wiimote Whiteboard is creating the IR pen. Johnny Lee suggests wiring up a circuit containing an IR LED, momentary switch, resistor, and power supply, then shoving it into a pen. If you google “IR pen” you will also come up with some complicated solutions. One guy even tried to cram the circuit into a highlighter casing.
My solution is really quite straightforward. In fact you only need to go to your local electronics store and pick up two items: an LED keyring torch; and an IR LED. When purchasing an LED keyring torch, make sure that you can easily replace the LED. I used this LED keyring torch from Jaycar Electronics. I then pulled the torch apart, pulled out the LED, and replaced it with an IR LED. This solution meant I didn’t have to do any soldering or fiddling around. It all fit together into a nice compact form factor that cost me less than $10, and took no longer than 10 minutes to switch the LED.
Once you have plugged in your USB Sensor Bar you will notice the markedly improved cursor movements. The Wiimote can now be used as a replacement for your mouse. You can move the cursor around by moving the Wiimote in the direction that you want the cursor to move. You can also press the A and B buttons for left and right click mouse functionality respectively.
To make the most of the Wiimote when working with Mingle it is worth installing the Mouse Gestures plugin for Firefox. You can activate a mouse gesture or Wiimote gesture by holding down the B button and moving the Wiimote around to activate a command. For example you can hold the B button and draw an X within Firefox to close a tab, or move the Wiimote upward then to the right to navigate to the next tab on the right.
You can also lasso a bunch of links and all the links will open up in their own tabs. Navigating up and down a page is as easy as drawing up and down arrows respectively. The Wiimote just works beautifully with the Mouse Gestures plugin.
I had a few days off work to recharge the batteries and was looking forward to heading to the beach, but ended up taking a rain check due to the bad weather. Sydney just had the wettest Summer in years, which was good in a way as it ended up breaking the drought and putting water in the dams. So to make the most of my time off I decided to build my own USB Sensor Bar so that I could get a Wiimote working with my laptop.
If you followed my previous post on getting the Wiimote to work with Ubuntu, then you should be able to move the cursor around using your Wiimote, and using the A and B buttons as left and right clicks respectively. However, using the accelerometer alone for moving the cursor around does not make for a great user experience. To enable the Wiimote to work more effectively you need to setup a point of reference that can be used by the Wiimote driver to calculate the directional movement of the Wiimote accelerometers. This point of reference for the Wii is the Sensor Bar that sites on top of the television set. So you can either buy a battery powered Sensor Bar or make your own USB Sensor Bar. I ended up doing the latter by following the instructions at Terbidium.
To get started you need a USB cable, four infrared LEDs, LED holders, aluminium tubing, electrical tape or heat shrink tubing, and a laptop.
The USB Sensor Bar is a simple serial circuit that consists of four infrared LEDs that are grafted to an old USB cable.
You may need to add a resistor into the circuit if your LEDs don’t produce a voltage drop of 5 Volts, which is the standard power source for USB devices. It is worth testing your circuit design on a circuit board as shown below.
The circuit is then squeezed into a tight-fitting aluminium tubing that is cut to about 30cm in length. The USB cable hangs out one end of the tubing, and the LEDs sit in LED holders that have been positioned into some neatly drilled holes. The completed USB Sensor Bar is pictured below.
I wrote earlier about using Mingle on a Nintendo Wii as an Agile project management tool. I figured it would be cumbersome to lug around a data projector, laptop, Airport Express, and Nintendo Wii to every meeting in which you want to use Mingle, such as a Showcase or technical stand-up. Not to mention the setup time in establishing a connection between the Wii and your Wi-Fi access point. So wouldn’t it be nice to remove the Nintendo Wii and the Airport Express from the equation and just use the Wiimote with your laptop? Well you can do just that, and it is really easy to setup on Ubuntu!
You can follow these instructions or just run the following in a terminal.
- Install Wiimote drivers using apt-get. Could it be any easier?
$ sudo apt-get install libcwiid0 lswm wmgui wminput
- Test Wiimote connection with your Bluetooth dongle. You should just plug in your USB Bluetooth dongle and Bluez will enable Bluetooth for you, assuming it has a driver that can support your dongle. I just have a run-of-the-mill ASUS Bluetooth dongle.
Select Connect from the menu and hold buttons 1 and 2 on your Wiimote to make it discoverable. You may need to do this a couple of times before wmgui picks up your Wiimote before timing out. Once connected, wmgui allows you to test the inputs of your Wiimote. You can enable rumble and accelerometer inputs from the menus.
- Run the mouse emulator.
$ sudo modprobe uinput
$ sudo wminput
Then put your Wiimote into discoverable mode by holding buttons 1 and 2 together again.
- The man pages for wminput does not recommend running wminput as root. So run the following command so that you can gain access to /dev/input/uinput without having to use sudo.
$ sudo sh -c 'echo "KERNEL=="uinput", GROUP="admin"" > /etc/udev/rules.d/50-cwiid-input.rules' /etc/init.d/udev restart
You should now be able to move the cursor around using your Wiimote, and using the A and B buttons as left and right clicks respectively. However, using the accelerometer alone for moving the cursor around does not make for a great user experience. The wminput driver is configured by default for the accelerometer, and if you want to move windows around with your Wiimote, then you’ll need to use the IR configurations instead. Simply replace the default soft link to the accelerometer config file with the ir_ptr config file.
$ cd /etc/cwiid/wminput
$ sudo rm default
$ sudo ln -s ir_ptr default
The Wiimote now needs a point of reference to use when sending coordinates back to the CWiiD driver. This is what the Sensor Bar is for. The Sensor Bar is simply an array of infra red LEDs that creates a plane for the Wiimote as a point of reference. The plane is used for rotation instructions such as the rotating hand effect on the Wii. You can’t use the Wii Sensor Bar with your laptop as it doesn’t have USB or a compatible connector with the laptop. I ended up building my own USB Sensor Bar, and will write about my experience in a later post. It was relatively simple and works quite well. However, it does require doing a bit of soldering, so if you aren’t comfortable with DIY electronics then I would recommend getting a Nyco battery powered Sensor Bar from eBay.
Now you should be able to fire up Mingle and start moving those story cards around on your laptop with just your Wiimote!
If you are using a Mac then you might want to try Darwin Remote [Free] or Remote Buddy [Not Free]. Windows users can use GlovePie or WiinRemote.