WiiMote Multi-Touch Whiteboard

Inspired by the original project at http://johnnylee.net/projects/wii/ , I decided to try this out for myself. The results were great. For a little under $5 worth of parts from Digikey, I was able to implement a few whiteboard pointers. Although the circuit is really simple (a current limiting resistor should really be put in place) some people may want to know that the pointer actually works prior to testing it on the whiteboard, wondering why nothing’s happening when the polarity of the LED is incorrect. The human eye can’t see the IR light emitted by these DIY pointers, but a digital camera can. Simply get any old digital camera (I used the one built into my LG phone) and just aim it at your IR LED in “preview” or “video” mode. The IR LED will shine brightly on the phone’s screen when the LED is active.

IR LED - Inactive, as viewed on my phone's camera

IR LED - Inactive, as viewed on my phone's camera

IR LED - Active, as viewed through my phone's camera

IR LED - Active, as viewed through my phone's camera

One may get even better results with a more specific LED, such as those listed here: http://wiicanetouchgraphic.blogspot.com/2009/03/wii-remote-ir-sensitivity.html . LED #4 seems to be the ideal choice, according to the author.

Also, with the use of some Silicone Singles (C), courtesy of WestOne (www.westone.com) I was able to make some custom-fitted finger pointers with the IR LED built right into them. These are little packages of a silicone putty (two types actually), that you can roll together in your hands like dough. Once you’ve combined them, you have about 5 minutes to form your shape, and it then hardens permanently. Fantastic stuff! Now you just need a Darth Vader or Iron Man novelty glove, 4 IR LEDs (a single WiiMote can track up to 4 IR sources at once), and you have one spiffy looking multi-touch enabled input device.

WiiMote, IR Pen, and IR Finger Pointer

WiiMote, IR Pen, and IR Finger Pointer

Next, using the WiiMote whiteboard software provided at johnnylee.net, along with a demo version of SmoothBoard, I was able to really get the ball rolling with some fun demo applications.

I’m considering building a simple multi-touch game for this in future, once the semester’s up. I have enough on my plate now with work, school, a project for BC Cancer Agency, and other independent work as part of an MRI analysis project.

I’ve tested the WiiMote successfully with the Asus Bluetooth Dongle (Asus BTD-21) and the builtin BroadCom one built into my Dell Mini 9. In the case of the BroadCom bluetooth radio (using the WIDCOMM drivers), some people have hit a snag when trying to pair the devices, stating that they have to enter a passkey, and that no option to “skip” or not enter a passkey at all presents itself. Simply update the WIDCOMM drivers to the latest version from BroadCom and it should work without any issues at all).

Slackware 12.2 Linux on an SDHC Card on a Dell Mini 9 Netbook (w/ Windows XP already installed)

Some time back I managed to get a hold of a shiny new Dell Inspiron Mini 9 Netbook. It’s been a great tool, helping me with my day-to-day work considerably. The only downsides to this device are that it comes with a maximum of 1GB RAM installed, and the largest available solid state drive I could get for it was 16GB. A larger solid state drive is at least a few hundred dollars, while an SDHC card can be purchased for a fraction of the cost. There are already several otherarticles available on Google showing one how to increase the amount of RAM, so I won’t cover that here.

LILO on my Mini 9

LILO on my Mini 9

What I found was that 8GB per OS was not enough for me to have both Windows XP and Slackware Linux installed onthis one machine and still have enough room to use the machine as I wanted. Windows, Microsoft Office, the .NET Framework 3.5, plus updates for all of these products quickly reduced the free space on my 8GB Windows partition to nothing. So, I set out to setup my machine so that I could have Windows running off of my 16GB solid state drive, and run Slackware 12.2 off of an SDHC card.

Before proceeding, please note that this is intended to be an overview of what I did to make this setup work on my netbook. It is not intended to serve as a tutorial to inexperienced users. This document is provided “as-is”, with no warranty, implied or otherwise. If following this document causes data loss, or your machine to crash, it’s your problem, not mine. Finally, if you found this useful, please link to it, rather than simply dump a copy of it on a forum. Thanks!

Now that that’s out of the way: the whole procedure is reasonably straightforward. All you’ll need to do this is as follows:

  • A means to boot your netbook from an optical drive. There are portable USB optical drives for netbooks which you can pick up for about $90-$110 (CAD) from most computer dealers or online. I just bought a Vantech ATA/USB adapter for $15, and a cheap DVD-Combo unit for $20 as well. Both work fine. You can also try to boot from a USB installer. Guides on how to build a bootable USB thumbdrive to install Slackware are available at http://connie.slackware.com/~alien/
  • An initrd.gz (Initial Ram Disk; More info here: http://slackware.osuosl.org/slackware/README.initrd)
  • The initrd.gz file MUST have the following modules at a minimum: ext3, mmc_core, sdhci, sdhci-pci, mmc_block
  • There are two ways you can go about doing this: a) download the pre-made initrd.gz file from here (right-click->”Save As”):initrd.gz
  • Or b) just create it on a machine already running Slackware 12.2; Just cd to the /boot directory, backup the existing initrd.gz file (if it exists), and simply execute: mkinitrd -c -k 2.6.27.7-smp -m ext3:mmc_core:sdhci:sdhci-pci:mmc_block
  • Now just copy this new initrd.gz file to something like a USB thumbdrive, and you’re ready.

Vantech ATA/USB Adapter

Vantech ATA/USB Adapter

Now, what I did first was to format the solid state drive, and install Windows XP on it (optional),being sure to leave at least 200MB of unpartitioned space available. I then inserted the SDHC card into the slot in the side of the Mini 9 netbook. From here, I boot the Slackware 12.2 installation DVD, let it boot and login as root.

The solid state drive is picked up as /DEV/HDA immediately. So, now we can just create a Linux partiion on it by doing:

cfdisk /dev/hda

Create a new partition in the 200MB free space we left using the cfdisk utility. Make sure that it’s of type 82 (Linux), and be sure to “write” before quitting. Now, you should see /dev/hda1 and /dev/hda2 after running:

fdisk -l

Now we format this partition as ext by running:

mke2fs -j /dev/hda2

This will be our boot partition. Now, we need to access the SDHC card so that we can install Linux on it. cd to the /mnt directory, and do the following:

cd /mnt

mkdir  mmc  dvd  boot  usbdrive

mount /dev/hda2 /mnt/boot

mount /dev/sr0 /mnt/dvd

This will create mount folders for the optical drive (note that on your machine, you may have something other than /dev/sr0, such as /dev/scd0, etc). It will also mount our boot partition as well. Now, we need to get the modules for SDHC connectivity up and running. We’ll copy the kernel modules from the installation DVD, and dump it in the root folder (which is really just a ram disk at this point, since we’re still in the installer)

cp /mnt/dvd/slackware/a/kernel-modules-smp-2.6.27.7_smp-i686-1.tgz /

tar zxvvf kernel-modules-smp-2.6.27.7_smp-i686-1.tgz

cd /lib/modules/2.6.27.7-smp/kernel/drivers/mmc

insmod core/mmc_core.ko

insmod host/sdhci.ko

insmod host/sdhci-pci.ko

insmod card/mmc_block.ko

This will install all the modules we need to access the SDHC card. Now, we need to make a device node for the SDHC card and any partitions we want on it (I actually used only 6GB of my 8GB card, and the rest I set aside for a FAT32 partition so that I could access data stored there by both Linux and Windows XP). So, to create the device nodes:

mknod /dev/mmcblk0 b 179 0

mknod /dev/mmcblk0p1 179 1

mknod /dev/mmcblk0p2 179 2 ***OPTIONAL

cfdisk /dev/mmcblk0

In cfdisk, first setup a Linux partition like before. If you want to setup a FAT32 partition, you can do that now as well. Now, you’re all set. I wouldn’t bother setting up a swap partition on the SDHC card. You’re likely to burn it out, and SD cards are terribly slow to be using for paging. So, just run:

setup

And install Slackware as you normally would (to the mmcblk0p1 partition). Don’t bother with lilo right now, it won’t work. Once Slackware setup is finished, exit the installer, but do NOT reboot yet. We need to setup LILO so that we can boot this installation of Linux we just finished installing. So, first let’s mount our SDHC card containing the new Linux installation:

mount /dev/mmcblk0p1 /mnt/mmc

mknod /mnt/mmc/dev/mmcblk0 b 179 0

mknod /mnt/mmc/dev/mmcblk0p1 b 179 1      ***We shouldn’t have to do these steps, but for some reason it just works

Now, insert the USB thumb drive contraining the  initrd.gz file into a USB port on your machine. Unless you have additional SATA devices already connected (now why would you do that?) you should be able to mount the USB thumbdrive with:

mount /dev/sda1 /mnt/usbdrive

cp -r /mnt/mmc/boot/* /boot/

cp /mnt/usbdrive/initrd.gz /boot/

umount /mnt/usbdrive   ***you can remove/eject the USB thumbdrive at this point

Now that all the files we need are in place, we just need to edit our lilo.conf file.

vi /mnt/mmc/etc/lilo.conf

Mine looks like the listing below, I’d recommended the same for you. You can just copy and paste this in, or re-type it, whatever works for you.

lba32

boot = /dev/hda

append=” vt.default_utf8=0″

prompt

timeout = 50

#VESA framebuffer console @ 800x600x32k

vga=787

#Windows bootable partition config begins

other = /dev/hda1

label = WindowsXP

table = /dev/hda

#Windows bootable partition config end

#Linux bootable partition config begins

image = /boot/vmlinuz

initrd = /boot/initrd.gz

root = /dev/mmcblk0p1

label = Slackware12

read-only

#Linux bootable partition config ends

Now that the lilo configuration file is setup, all that’s left is to install LILO.

/mnt/mmc/sbin/lilo -C /mnt/mmc/etc/lilo.conf

You will likely get 3 warnings, no errors, and we’re all set. From here you can simply reboot the PC, and use LILO to boot either of Windows XP or Slackware 12.2

Enjoy!