juani_c 66 Posted October 15, 2010 Share Posted October 15, 2010 I made this little project and wanted to share it. The code is mostly from "Half Duplex Software UART on the LaunchPad" by NJC, I just added the ADC parts I needed. The Processing application send first a "X" and the LP answer with the value from one of the axes, then send a "Y" and you get the value from the other axis. After that the soft update the snake position and repeat the process. In order to start the game you have to click on the START button (pretty obvious), you lose if the snake touchs any of the sides, also the length and speed increase as you eat the little boxes. The codes are far from perfect and can be improved. I'm making a little video (that actually took me almost the same amount of time I spent programming) and I'll upload it in a while. EDIT:here is the video Launchpad-Snake.rar NJC, canibalimao, bluehash and 3 others 6 Quote Link to post Share on other sites
gatesphere 45 Posted October 15, 2010 Share Posted October 15, 2010 Whoa, sweet! Great idea! There are some very interesting projects coming out lately. I like this. Quote Link to post Share on other sites
bluehash 1,581 Posted October 16, 2010 Share Posted October 16, 2010 oh hell! That is amazing! Thanks for sharing.. The response time is amazing too. Quote Link to post Share on other sites
juani_c 66 Posted October 16, 2010 Author Share Posted October 16, 2010 Thanks for the feedback!!! i'm trying to upload the video again with better resolution Quote Link to post Share on other sites
jsolarski 94 Posted October 17, 2010 Share Posted October 17, 2010 Thats awesome!! to bad i dont have an extra accelerometer. Quote Link to post Share on other sites
juani_c 66 Posted October 17, 2010 Author Share Posted October 17, 2010 Thats awesome!!to bad i dont have an extra accelerometer. thanks!! well the accelerometer it's just one possibility, you could hook up any other device to both ADC channels to control the snake, in fact...that could be a nice challenge: make new,differents and funny ways to play!!! Quote Link to post Share on other sites
bluehash 1,581 Posted October 17, 2010 Share Posted October 17, 2010 l the accelerometer it's just one possibility, you could hook up any other device to both ADC channels to control the snake, ...like a joystick. Quote Link to post Share on other sites
GeekDoc 226 Posted October 17, 2010 Share Posted October 17, 2010 ...like a joystick. Wow, that's pretty retro of you, bluehash! Why not a web-based, mobile-enabled app that controls intensity of a blue and a green laser to run the game via CdS cells from 100m away? Truth be told, I have a bunch of joysticks, but all microswitch-based for the MAME cabinet I was building (note: I did not write "built", as in "finished"). Nice job, juani_c, and the music is great! I checked out the site you credited and found some more I liked. Quote Link to post Share on other sites
NJC 17 Posted October 27, 2010 Share Posted October 27, 2010 I really like this project. Totally cool. :-) Quote Link to post Share on other sites
cde 334 Posted October 27, 2010 Share Posted October 27, 2010 l the accelerometer it's just one possibility, you could hook up any other device to both ADC channels to control the snake, ...like a joystick. Why spend 4+shipping on that, when you can gut an old analog ps controller. Hell, you can buy them new for 5 bucks, and you get two plus other bits. Quote Link to post Share on other sites
GeekDoc 226 Posted October 27, 2010 Share Posted October 27, 2010 ...you can gut an old analog ps controller. I just did that very thing for some rumble motors. Total from one controller: 2 rumble motors (1 with smaller weight, 1 larger), 2 analog joysticks with push switch, 2 small PCBs with traces for silicone type buttons (and the contacts for them), a few through-hole capacitors, a bunch of surface-mount devices (including some that look like inductors), cable with USB-A end. I love when I can scrounge usable parts! rivalslayer 1 Quote Link to post Share on other sites
rivalslayer 0 Posted December 13, 2010 Share Posted December 13, 2010 Great! Quote Link to post Share on other sites
jbremnant 17 Posted December 13, 2010 Share Posted December 13, 2010 oh wow, this is great. This is working off of 9600 baud rate? Quote Link to post Share on other sites
Maris 3 Posted December 13, 2010 Share Posted December 13, 2010 I like it a lot! Can you tell a bit more what Accelerometer chip you used and how did you connected to Launchpad? Connecting Accelerometer to Launchpad is in one of my next things to do Quote Link to post Share on other sites
GeekDoc 226 Posted December 13, 2010 Share Posted December 13, 2010 I like it a lot! Can you tell a bit more what Accelerometer chip you used and how did you connected to Launchpad? Connecting Accelerometer to Launchpad is in one of my next things to do Seed Studio is now selling an accelerometer on a breakout board for US$15: LINK Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.