Recently I've been trying to carve out more time to play with technology - something I'd been neglecting sorely, despite constant admonitions (1, 2) to others to always make time to play.
One of the first results of this is a library for creating peer to peer LAN connections between AIR applications, with a strong focus on mobile to desktop applications. I'll go into more depth about the LAN library in a future post, but for now I wanted to share something I built on top of it... the Nexus One Wireless Slot Car Gas Pedal.
Check it out in the following video:
To summarize: The generic mobile client connects over the LAN to the desktop app. The desktop app sends it a "surface" SWF which contains all of the graphics and logic for the interaction (allowing the host to dictate the experience). The mobile client then sends accelerometer data to the host, which interprets the data, and sends back commands to update the client UI. The host communicates with a Phidgets motor controller, which controls the speed of the cars. And yes, it supports multiple connections (limited to 2 in this case because that's how many cars I have).
I'll be sharing a few other experiments I've built exploring some of these ideas in the near future, as well as more info on the LAN connection code (which I will likely open source if there is sufficient demand to justify cleaning it up and documenting it).
Here's a photo of the original control system, which used a servomotor to replicate physically squeezing the trigger on the slot car controller:
And here's what the harness looks like when you have two hands free to put the phone in it properly:


Comments (28)
Nice work! Can the Nexus One vibrate too (and can you tap into this via ActionScript)? Haven't an Android phone yet alas :'-(
Posted by: Wayne McManus at June 15, 2010 10:21 AMURL: http://www.coderkind.com
niiiiiiiice!
Posted by: George Profenza at June 15, 2010 10:22 AMURL:
Brilliant.
Posted by: Paras at June 15, 2010 10:28 AMURL: http://www.iris-digital.com
Wicked cool!
Posted by: Lee Graham at June 15, 2010 10:43 AMURL: http://L33.me
Amazing! I'm interesting in the LAN library.
Posted by: miguelMoraleda at June 15, 2010 12:25 PMURL: http://as3.miguelmoraleda.com
This is the future! Thanks for the share
Posted by: Eric Fickes at June 15, 2010 12:28 PMURL: http://ericfickes.com
This is ACTUALLY N-E-R-D! Lmao :D
Posted by: Pierluigi Pesenti at June 15, 2010 02:30 PMURL: http://blog.oaxoa.com/
Grant - I think there will definitely be a call for the lan library - it would be highly beneficial.
Can you comment on your notion of a surface swf ? I take it you are trying to control your phone via your lan - how does this work ?
Regards,
Aristo.
Posted by: Aristophrenia at June 15, 2010 06:13 PMURL:
Kudos for having TTs race around the track ;)
Posted by: Scott (@endoplasmic) at June 15, 2010 11:34 PMURL: http://www.mxprojects.com
love the lego use also.
Posted by: jkaris at June 16, 2010 04:52 AMURL: http://kafkaris.com
Agreed with Pierluigi: N-E-R-D!
Outstanding!
Posted by: CaioToOn! at June 16, 2010 06:32 AMCaioToOn!
URL:
Amazing! The video rendered me speechless!
Posted by: Mark Starling at June 16, 2010 07:06 AMURL: http://markstar.co.uk/blog/
I love that your iPhone is sitting all lonely and forgotten in the background of that last photo :)
Posted by: Jason MacDonald at June 16, 2010 07:42 AMURL:
Best use of Lego's + Servo's in a while lol. Nice work grant.
Posted by: JTtheGeek at June 16, 2010 11:43 AMURL: http://www.dedoose.com
I submitted this to the Hack-a-Day blog: http://hackaday.com/2010/06/16/careful-that-gas-pedal-is-a-nexus-one/
Posted by: Michael Hoskins at June 17, 2010 09:11 AMURL:
Groundbreaking, man! Do you have a patent, already? :)
Posted by: Chris Kepinski at June 18, 2010 05:21 AMURL: http://kkepinski.com
thats fun...useless for me since i'm not slotcar driving but seems to be fun...but you may share the coding with us which would it make even more interesting...
Posted by: pheno at June 18, 2010 10:01 AMURL:
God dammit. Couldn't you wait for us to catch up to your AS3 skills a little more before you start tackling everything else? Amazing.
Posted by: Scott Gibson at June 18, 2010 08:49 PMURL:
Wow,
Posted by: laaptu at June 21, 2010 01:39 AMYou are amazing n it is difficult to catch up with you as your pace in learning n experimenting is above extraordinary.
URL: http://laaptu.wordpress.com
Really interested in how you implemented a communication between Android and PC :)
Posted by: Sergej Jevsejev at June 21, 2010 03:33 AMURL: http://sjevsejev.blogspot.com
incredible !!!
Posted by: andy at June 25, 2010 06:35 AM:)
please open the lan library ...
URL: http://www.xe-media.ch/
Brilliant! Now you HAVE to get it working with Scalextric Digital, add a lane change 'button', lap time display...
Useful info here - http://www.slotforum.com/forums/index.php?showtopic=10709
Posted by: SinclairZ at June 30, 2010 01:48 PMURL:
Amazing, I'd appreciate the LAN connection code =)
Posted by: sixtus at July 1, 2010 03:47 AMURL: http://sixtuslab.com
I have an Android Phone but I would have never thought of Putting it to such good use lol :D
Posted by: Sergiu at July 1, 2010 04:29 AMURL: http://www.sergiubirzu.com/
Just great!
Posted by: Dourado at July 7, 2010 06:25 AMI love it!
URL: http://www.jorgedourado.com
Great work. Can i ask you something? the connection you made between pc-mobile is with socket class?
Posted by: akis at July 16, 2010 03:17 PMURL:
I'm blown away by this use of technology. How did you ever think of slot car racing as a platform for your experiment? What's next control over my vacume cleaner?
Posted by: Frank T at July 25, 2010 07:24 AMURL: http://www.speedzonenj.com
You Rock man, I'm inspired on all you projects you done, possible to share you LAN Library and how to use that. Thank you very much man.
Posted by: Henr V. Mempin at August 1, 2010 10:56 PMURL: http://henrymempin.multiply.com