Magic Wands: ZigBee Enabled Group Gaming

Magic Wands

Over the last semester, my 18-549 group of Adeola Bannis, Claire Mitchell, Ethan Goldblum, and I has designed and prototyped a magic wand for theme park patrons to use for group games while waiting in long lines.  The initial idea of a crowd interaction device (and several thousand dollars of funding) was provided by Disney Research, but we ran with the concept, adding ZigBee wireless networking, an accelerometer, IR tracking via webcam, location based gaming, and so on.  We also wrote a few proof of concept games to go along with it.  I lost more sleep over this class than any other I’ve taken, but I learned quite a bit more as well.

The hardware is based loosely on Arduino, and we used their bootloader.  The software is a modified xbee-api-on-arduino library and code to interface the hardware.  The wand consists of an ATmega168, a 3-axis analog accelerometer, a Series 2 XBee, power and lithium ion charging circuitry, a 1400 mAh lithium ion battery, a very highly mediocre button pad, an RGB LED, an IR LED, and an incredible enclosure that Zach Ali at dFAB designed for us.  We went through a few hardware iterations before settling on this.  The prototypes we built are probably around $60 each in parts, but dropping the XBee for a basic 802.15.4 IC and buying in bulk would drop it below $20.  Our goal was to have the wand last a week long theme park visit without needing charged.  Our current implementation doesn’t put the XBee to sleep, so it would last around 24 hours of constant use.  Sleeping, we would reach about 9 days, surpassing the goal.  Swapping out the XBee would also cut current draw in half.  Wands can be charged over USB mini (yay for not using proprietary connectors!).

Perhaps the hardest part of the project was devising the network architecture and choosing where the divisions were between wand, server, and game.  In general, the underlying network is abstracted completely away from both the wands and the games.  The wands are simply advertised games that they are within range to play, and the games are sent joins when the wand joins the game.  There are wand and server side timers to make sure that wands are never stuck inside a game if someone walks out of range of the network.

The server tracks all joins and parts from games in a database, and there is a web based interface to allow for user tracking.  Perhaps my favorite simple gee-whiz feature that we added is remote battery level tracking.  Each time a wand joins a game, its battery level is logged, which is displayed in the web interface.  As the wands also have “display names” associated with them, it would be possible to tell someone, in game, that their battery level is low, if they ignore the red low battery LED on the wand.

The server is written in Java, using xbee-api to talk to wands and Google protobuf to serialize data to give to games.  We wrote client side networking libraries for Java and Python.  The games we wrote were mostly proof of concept to demonstrate the range of possible uses of the wand hardware.

The game below may look familiar.  I have stated probably multiple times that I would never touch RocketPong again, but it always manages to pull me back in.  In this variant, when a user joins the game, the star on their wand lights up with the color of their team, and their name appears next to their rocket.  They then tilt their wand up and down to control the thrust of the rocket.  The values between players on a team are averaged, so everyone on the team needs to cooperate if they want to win.  It ended up being a lot of fun, and was probably the most popular game during our final demo.  You can’t tell in the image below, but the star field in the background reacts to and collides with the ball, using the Lepton particle physics engine.

Group RocketPong

I also wrote a drawing game that uses the IR LED and a PS3 Eye modded with an IR filter.  We had originally used floppy disks for the filter, but we eventually got the correct IR bandpass filter for our LEDs.  I am really pleased with the PS3 Eye.  It is the only webcam I’ve seen that can do 60 fps VGA in Linux, and it also works beautifully with Pygame’s camera module.  The game is just a basic virtual whiteboard, allowing people to use their wand as a marker.  Pressing the buttons on the wand changes the color being drawn.  The whiteboard slowly fades away to white, erasing old drawings as the line moves on.  I had hoped to allow for multiple people to draw at the same time, but ran out of time.

During our final all-nighter, I quickly wrote a music app using the new Pygame midi module.  On joining the game, a user selects one of five instruments.  For the two percussion instruments, the user can shake the wand like a maraca or hit like a drumstick, using the accelerometer to trigger sound.  The other three instruments use the button pad to play notes.  Just because I could, this game also uses Lepton to shoot off music notes every time someone plays one.  This game is a really watered down version of a project called Cacophony that I will be developing farther when I have time.

We also had a trivia/voting game, and a cave game clone, which I did not write.

I doubt the project as a whole would be useful to anyone else out there, but individual chunks of it surely are.  You can get code, schematics, documentation, and assorted other junk for the entire project at our gitorious repo.  Note that parts of it probably don’t function, and much of it requires a very specific set of libraries.  If you are really interested, I would be happy to help you use what you want of it.  The licensing of just about everything is pretty murky, so talk to me first if you are planning on publishing anything based on this.

Related Posts

5 Responses to “Magic Wands: ZigBee Enabled Group Gaming”

  • Hey! Your webpage is loading slow , this kind of went on sort of a
    minute or two to finally reload, I dont know whether or
    not it’s just me or your websites but facebook worked acceptable for
    me. Nevertheless, I’d like to appreciate you for attaching amazing blog post.
    Perhaps it has already been beneficial to many people who arrived at this point.

    This one is without a doubt excellent what you actually have done and would like
    to see articles from your website. To get additional understanding through posts
    you post, I have book marked this web site.

  • It is painful (probably somewhat like attempting to wash
    your face with sand paper to get rid of high school acne) so it is generally performed with local or general anesthesia.
    When Kuniyoshi became a master himself he trained a
    large number of pupils such as Yoshitora, Yoshimori, Yoshitsuya, Yoshiiku and Yoshikazu.
    They represent the transformation from childhood to being an adolescent.
    Online Tattoo membership sites charge a small one time fee, but it is well worth it because it will give you
    access to a goldmine of tattoo design help not found anywhere else.

  • Many thanks for a different insightful site. The site else might I get that kind of info designed in a very excellent approach? I own a undertaking that I’m at the moment focusing on, and that i happen to be on the view out to get similarly info.

  • Hey! Your webpage is loading slowly , this kind of took
    just like a minute to reload, I really dont know if it’s just me or your website although facebook worked acceptable for me.
    Anyways, I’m going to say thanks for attaching excellent blog post.
    I assume it really has become helpful to lots of people .
    I hope I’ll be able to find more awesome
    things and I should complement simply by stating you have done awesome writing.

    To get additional information through posts you publish, I’ve saved to my bookmarks
    this site.

  • 精准医疗又叫个性化医疗,是指以个人基因组信息为基础,结合蛋白质组,代谢组等相关内环境信息,为病人量身设计出最佳治疗方案,以期达到治疗效果最大化和副作用最小化的一门定制医疗模式。因此相较传统医疗,精准医疗具有针对性、高效性及预防性等特征。





    精准医疗要做到个性、高效及预防的关键在于筛查和诊断,因此基因测序等检测诊断技术的发展是关键。成本的下降让基因测序商业化市场的打开成为可能,基因测序技术的成熟和商用经过了多年的发展,1980 年自动测序仪出现,2001 年完成了人类基因组框架图标志着这一技术的成熟,2007 年二代基因测序技术大幅降低测序成本,使得这一技术应用出现可能,以走在前列的Illumina 公司为例,该公司自2007 年起把当时每个基因组的测序成本费用从1000万美元降到了当下的1000 美元, 根据Illumina 公司数据,全球NGS(二代基因测序)的应用市场规模预计为200 亿美元,药品研发和临床应用是增速最快的领域,增速超过15%,肿瘤诊断和个性化用药是最有应用前景的领域,市场规模120亿美元。乐土投资与Illumina以及新一代的基因检测公司Genalyte, Centrillion都有着合作关系。


    全球创新论坛纽约峰会由全美华人金融协会(The Chinese Finance Association, TCFA) 主办。全美华人金融协会于一九九四年在美国成立。分布在世界各地的会员来自华尔街投行、基金、监管部门、和学术界,已成为联系中美金融界最重要的桥梁之一。协会定期举行学术年会。协会本部设在纽约,并在波士顿,华盛顿,旧金山,伦敦,香港,北京和上海等金融中心设有分会。


Leave a Reply