<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gary Bishop &#187; Wiimote</title>
	<atom:link href="http://wwwx.cs.unc.edu/~gb/wp/blog/category/wiimote/feed/" rel="self" type="application/rss+xml" />
	<link>http://wwwx.cs.unc.edu/~gb/wp</link>
	<description>Geeks making the world a bit better</description>
	<lastBuildDate>Wed, 14 Oct 2009 00:31:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Project Ideas for Wiimote Enabled Firefox</title>
		<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2009/07/24/project-ideas-for-wiimote-enabled-firefox/</link>
		<comments>http://wwwx.cs.unc.edu/~gb/wp/blog/2009/07/24/project-ideas-for-wiimote-enabled-firefox/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 01:58:42 +0000</pubDate>
		<dc:creator>gb</dc:creator>
				<category><![CDATA[Enabling Technology]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Wiimote]]></category>

		<guid isPermaLink="false">http://wwwx.cs.unc.edu/~gb/wp/?p=561</guid>
		<description><![CDATA[I&#8217;m thinking of things we can do with the nearly ready Wiimote (and Balance Board) capability in our Outfox extension. We can use the accelerometers, IR camera, buttons, and rumble. I&#8217;m going to list game/activity ideas so I can recruit some help.


Duck Hunt: use the Wiimote as the gun.
Spelling of the Dead: Spell the word [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m thinking of things we can do with the nearly ready Wiimote (and Balance Board) capability in our Outfox extension. We can use the accelerometers, IR camera, buttons, and rumble. I&#8217;m going to list game/activity ideas so I can recruit some help.</p>
<p><span id="more-561"></span></p>
<ol>
<li>Duck Hunt: use the Wiimote as the gun.</li>
<li>Spelling of the Dead: Spell the word by blasting zombies that are labelled with letters.</li>
<li>Use the D-pad in Pete&#8217;s Space! game</li>
<li>Fly Swat: Kill a fly that you can hear and see.</li>
<li>Read Along: Shake the wiimote on each word as you read along silently. Maybe shake it harder on the key words. Shows that the user is reading.</li>
<li>Johnny Chung Lee style head or hand tracker for cursor control or on-screen keyboard.</li>
<li>Make a character (car, pony, model, etc.) on the screen move by moving the wiimote to encourage a child doing physical therapy.</li>
<li>Round up animals in sound and/or visuals by leaning on a rocking horse or exercise ball like Rockin&#8217; SafaWii.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://wwwx.cs.unc.edu/~gb/wp/blog/2009/07/24/project-ideas-for-wiimote-enabled-firefox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using the Wiimote with PyGame</title>
		<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2008/01/19/using-the-wiimote-with-pygame/</link>
		<comments>http://wwwx.cs.unc.edu/~gb/wp/blog/2008/01/19/using-the-wiimote-with-pygame/#comments</comments>
		<pubDate>Sat, 19 Jan 2008 13:51:45 +0000</pubDate>
		<dc:creator>gb</dc:creator>
				<category><![CDATA[Enabling Technology]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Wiimote]]></category>

		<guid isPermaLink="false">http://wwwx.cs.unc.edu/~gb/wp/blog/2008/01/19/using-the-wiimote-with-pygame/</guid>
		<description><![CDATA[Several of my project teams this semester will (I hope) use PyGame and the Wiimote in their projects. I had it working fine on Ubuntu but struggled to find an interface that works with Python on Windows XP. Luke pointed me to wiiuse so I wrote a very simple wrapper with ctypes and then wrapped [...]]]></description>
			<content:encoded><![CDATA[<p>Several of my <a href="http://www.cs.unc.edu/Courses/comp523-s08/">project teams</a> this semester will (I hope) use <a href="http://www.pygame.org/news.html">PyGame</a> and the <a href="http://en.wikipedia.org/wiki/Wii_Remote">Wiimote</a> in their projects. I had it working fine on Ubuntu but struggled to find an interface that works with Python on Windows XP. Luke pointed me to <a href="http://www.wiiuse.net/">wiiuse</a> so I wrote a very simple wrapper with <a href="http://docs.python.org/lib/module-ctypes.html">ctypes</a> and then wrapped that in a module for PyGame. You can find the code in <a href="http://sourceforge.net/projects/uncpythontools">CVS at SourceForge</a> in pywiiuse. I also uploaded a <a href="http://downloads.sourceforge.net/uncpythontools/PyWiiUse-1.0.tar.gz?use_mirror=osdn">source release</a>. You&#8217;ll need wiiuse.dll on Windows or wiiuse.so on Ubuntu.</p>
<p><span id="more-324"></span></p>
<p>Here&#8217;s a simple example using it in PyGame.</p>
<pre>
import pygame
import pygame_wiimote # ideally something like this would be part of pygame so the _ would become .
import sys

pygame.init()

# initialze the wiimotes
print 'press 1&#038;2'
pygame_wiimote.init(1, 5) # look for 1, wait 5 seconds
n = pygame_wiimote.get_count() # how many did we get?

if n == 0:
    print 'no wiimotes found'
    sys.exit(1)

wm = pygame_wiimote.Wiimote(0) # access the wiimote object
wm.enable_accels(1) # turn on acceleration reporting

w,h = size = (512,512)
screen = pygame.display.set_mode(size)

run = True

old = [h/2] * 3
maxA = 2.0

colors = [ (255,0,0), (0,255,0), (0,0,255) ]

while run:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            print 'quiting'
            run = False
            break
        elif event.type == pygame_wiimote.WIIMOTE_BUTTON_PRESS:
            print event.button, 'pressed'
        elif event.type == pygame_wiimote.WIIMOTE_BUTTON_RELEASE:
            print event.button, 'released'
        elif event.type == pygame_wiimote.WIIMOTE_ACCEL:
            for c in range(3):
                s = int((event.accel[c] * h / maxA + h)/2)
                s = max(0, min(h-1, s))
                pygame.draw.line(screen, colors[c], (w-3, old[c]), (w-2, s))
                old[c] = s
            screen.blit(screen, (-1, 0))
        elif event.type == pygame_wiimote.NUNCHUK_ACCEL:
            print 'n accel', event.accel

    pygame.display.flip()
    pygame.time.wait(10)

wm.disconnect()
</pre>
]]></content:encoded>
			<wfw:commentRss>http://wwwx.cs.unc.edu/~gb/wp/blog/2008/01/19/using-the-wiimote-with-pygame/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Wiimote Latency</title>
		<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2008/01/10/wiimote-latency/</link>
		<comments>http://wwwx.cs.unc.edu/~gb/wp/blog/2008/01/10/wiimote-latency/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 20:44:13 +0000</pubDate>
		<dc:creator>gb</dc:creator>
				<category><![CDATA[Wiimote]]></category>

		<guid isPermaLink="false">http://wwwx.cs.unc.edu/~gb/wp/blog/2008/01/10/wiimote-latency/</guid>
		<description><![CDATA[I&#8217;m just beginning to play with the Wiimote as an input device for accessible games so I tried shaking it in time with some music using a little program I already had in place. The accelerometer data seemed very delayed so I decided to check out its latency. My initial experiments described below indicate that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m just beginning to play with the Wiimote as an input device for accessible games so I tried shaking it in time with some music using a little program I already had in place. The accelerometer data seemed very delayed so I decided to check out its latency. My initial experiments described below indicate that it is very low.</p>
<p><span id="more-316"></span></p>
<p>I&#8217;m running Ubuntu Gutsy Gibbon and using a IOdata Bluetooth adapter along with the cwiid driver and python wrapper. I wrote a little script (<a href='http://wwwx.cs.unc.edu/~gb/wp/wp-content/uploads/2008/01/latency.py' title='latency.py'>latency.py</a>) to experiment with it. The script uses pygame to capture and record the times of keyboard events, mouse motion events, mouse button events, and wiimote button and accelerometer events. I write simple records to a text file indicating the time, type of event, and any event data.</p>
<p>In the first experiment I banged the wiimote into my finger so that the A button was pressed. Hitting my finger should produce a spike in acceleration along with the button hit. The data supports this with the peak in acceleration happening within 10 milliseconds of the time reported for the button hit. That says there is no significant time difference between the buttons and the accelerometers on the wiimote.</p>
<p>In the second experiment I banged the wiimote into a mouse button. Previous experiments had convinced me that mouse events have low latency to pygame. In this case the peak in acceleration occurs slightly before the mouse button event so the delay of the wiimote is less than the delay of the mouse. </p>
<p>Now to figure out what is causing the apparent delay in my other program.</p>
]]></content:encoded>
			<wfw:commentRss>http://wwwx.cs.unc.edu/~gb/wp/blog/2008/01/10/wiimote-latency/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wii Remote Drums</title>
		<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2008/01/06/wii-remote-drums/</link>
		<comments>http://wwwx.cs.unc.edu/~gb/wp/blog/2008/01/06/wii-remote-drums/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 13:38:16 +0000</pubDate>
		<dc:creator>gb</dc:creator>
				<category><![CDATA[Enabling Technology]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Wiimote]]></category>

		<guid isPermaLink="false">http://wwwx.cs.unc.edu/~gb/wp/blog/2008/01/06/wii-remote-drums/</guid>
		<description><![CDATA[Pete sent a pointer to this video demonstrating drumming with the Wii Remote.
]]></description>
			<content:encoded><![CDATA[<p>Pete sent a pointer to this <a href="http://www.5min.com/Video/WiiDrums-930976">video demonstrating drumming with the Wii Remote</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://wwwx.cs.unc.edu/~gb/wp/blog/2008/01/06/wii-remote-drums/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another great Wii remote hack from Johnny Chung Lee</title>
		<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/12/21/another-great-wii-remote-hack-from-johnny-chung-lee/</link>
		<comments>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/12/21/another-great-wii-remote-hack-from-johnny-chung-lee/#comments</comments>
		<pubDate>Fri, 21 Dec 2007 23:53:18 +0000</pubDate>
		<dc:creator>gb</dc:creator>
				<category><![CDATA[Enabling Technology]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Wiimote]]></category>

		<guid isPermaLink="false">http://wwwx.cs.unc.edu/~gb/wp/blog/2007/12/21/another-great-wii-remote-hack-from-johnny-chung-lee/</guid>
		<description><![CDATA[Over at Gizmodo is a nice video demonstration of 3D head-tracking for desktop VR using the Wii remote.
]]></description>
			<content:encoded><![CDATA[<p>Over at Gizmodo is a nice <a href="http://www.engadget.com/2007/12/21/diy-head-tracker-takes-wiimote-hacking-to-dizzying-new-heights/">video demonstration of 3D head-tracking for desktop VR using the Wii remote</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/12/21/another-great-wii-remote-hack-from-johnny-chung-lee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wow! Great Wiimote idea!</title>
		<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/11/29/wow-great-wiimote-idea/</link>
		<comments>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/11/29/wow-great-wiimote-idea/#comments</comments>
		<pubDate>Thu, 29 Nov 2007 19:04:35 +0000</pubDate>
		<dc:creator>gb</dc:creator>
				<category><![CDATA[Enabling Technology]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Wiimote]]></category>

		<guid isPermaLink="false">http://wwwx.cs.unc.edu/~gb/wp/blog/2007/11/29/wow-great-wiimote-idea/</guid>
		<description><![CDATA[Wiimote, Rocking Horse Combined to Create Makeshift Racing Sim. Variations on this would be so great for kids with disabilities.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://gizmodo.com/gadgets/gaming/wiimote-rocking-horse-combined-to-create-makeshift-racing-sim-327772.php">Wiimote, Rocking Horse Combined to Create Makeshift Racing Sim</a>. Variations on this would be <strong>so</strong> great for kids with disabilities.</p>
]]></content:encoded>
			<wfw:commentRss>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/11/29/wow-great-wiimote-idea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
