Starting to come together...
04 Dec 2009
- Wireless communication from a Linux machine to an AVR microcontroller using two XBee modules
- Accurate altitude reading with an AVR by reading the PWM signal coming out of a sonar sensor
- A semi-complex, multi-threaded control station capable of sending altitude commands to the helicopter while listening for data over a UDP socket
- Successful data link between a WiiMote controller and a Linux machine which talks to the control station
I'm using the cwiid python module to interface with the WiiMote controller. It's laughably simple to get data and do cool things with the WiiMote using cwiid. Could make for some fun little projects...
Here's a tiny example to read the pitch of the controller:
print 'place wiimote in discoverable mode (press 1 and 2)...'
wiimote = cwiid.Wiimote()
wiimote.rpt_mode = cwiid.RPT_ACC
#wiimote.state dict now has an acc key with a three-element tuple
print 'pitch: %d' % (wiimote.state['acc'][cwiid.Y])
5 lines of code and you're there. I love python.
Another video demo (with WiiMote pseudo-control):
blog comments powered by Disqus
- GitHub Profile
- Stack Overflow Careers Profile
- Stack Overflow Profile
- G+ Profile
- PGP Public Key
- Rafty -- Ripper and Friggin Transcoder, Y'all
- Make Readme Markdown
- Diffview Mode
- Indent Hints Mode
- Track That Thing
- Co-Founder & CEO of Directangular, LLC.
- Previously: Linux Kernel development for QuIC. Some of my work (a little stale) is available on the Code Aurora Forum, here, here, here, and here.
- My nerd hobby: Creating and contributing to a variety of Open Source projects. See my GitHub profile.