// API callback
showrecentposts({"version":"1.0","encoding":"UTF-8","feed":{"xmlns":"http://www.w3.org/2005/Atom","xmlns$openSearch":"http://a9.com/-/spec/opensearchrss/1.0/","xmlns$blogger":"http://schemas.google.com/blogger/2008","xmlns$georss":"http://www.georss.org/georss","xmlns$gd":"http://schemas.google.com/g/2005","xmlns$thr":"http://purl.org/syndication/thread/1.0","id":{"$t":"tag:blogger.com,1999:blog-3623515592551780770"},"updated":{"$t":"2017-01-24T03:49:22.525-05:00"},"category":[{"term":"Programming"},{"term":"TI"},{"term":"msp430"},{"term":"pcb"},{"term":"texas instruments"},{"term":"thrun"},{"term":"Basic Stamp"},{"term":"Door Unlocker"},{"term":"Keyless Entry"},{"term":"Parallax"},{"term":"RFID"},{"term":"Servo"},{"term":"atmega"},{"term":"board"},{"term":"booster"},{"term":"boosterpack"},{"term":"c"},{"term":"challenge"},{"term":"code"},{"term":"coffee table"},{"term":"coop"},{"term":"coop design challenge"},{"term":"darlington"},{"term":"design"},{"term":"display"},{"term":"driver"},{"term":"eagle"},{"term":"etching"},{"term":"eye"},{"term":"fpga"},{"term":"gameduino"},{"term":"gamepack"},{"term":"gamingpack"},{"term":"gspca"},{"term":"hack"},{"term":"hacking"},{"term":"hot air"},{"term":"intern"},{"term":"jansen"},{"term":"john"},{"term":"karmic"},{"term":"kinematics"},{"term":"launchpad"},{"term":"layout"},{"term":"led"},{"term":"linux"},{"term":"man in the middle"},{"term":"matlab"},{"term":"matrix"},{"term":"max"},{"term":"max thrun"},{"term":"mechanics"},{"term":"omegle"},{"term":"ov534"},{"term":"patch"},{"term":"playstation"},{"term":"ps3"},{"term":"python"},{"term":"register"},{"term":"security"},{"term":"shift"},{"term":"simulation"},{"term":"soldering"},{"term":"surface mount"},{"term":"theo"},{"term":"ubuntu"},{"term":"verilog"},{"term":"wathen"},{"term":"xilinx"}],"title":{"type":"text","$t":"Max Thrun's Project Blog"},"subtitle":{"type":"html","$t":""},"link":[{"rel":"http://schemas.google.com/g/2005#feed","type":"application/atom+xml","href":"http:\/\/bear24rw.blogspot.com\/feeds\/posts\/default"},{"rel":"self","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default?alt=json-in-script\u0026orderby=published"},{"rel":"alternate","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/"},{"rel":"hub","href":"http://pubsubhubbub.appspot.com/"}],"author":[{"name":{"$t":"Max Thrun"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/18216963066514872707"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"http:\/\/img1.blogblog.com\/img\/b16-rounded.gif"}}],"generator":{"version":"7.00","uri":"http://www.blogger.com","$t":"Blogger"},"openSearch$totalResults":{"$t":"8"},"openSearch$startIndex":{"$t":"1"},"openSearch$itemsPerPage":{"$t":"25"},"entry":[{"id":{"$t":"tag:blogger.com,1999:blog-3623515592551780770.post-6594882444136163650"},"published":{"$t":"2013-07-26T00:16:00.000-04:00"},"updated":{"$t":"2016-03-09T16:37:34.042-05:00"},"title":{"type":"text","$t":"BeagleBone GamingCape"},"content":{"type":"html","$t":"\u003Ctable border=\"0\"\u003E    \u003Ctr\u003E        \u003Ctd valign=\"top\"\u003E            \u003Cbr\u003E            \u003Cb\u003ETEAM MEMBERS\u003C\/b\u003E            \u003Cbr\u003E\u003Cbr\u003E            Max Thrun\u003Cbr\u003E            \u003Cbr\u003E            \u003Cb\u003EPROJECT DESCRIPTION\u003C\/b\u003E            \u003Cbr\u003E\u003Cbr\u003E            Older brother of the \u003Ca target=\"new\"                 href=\"http:\/\/bear24rw.blogspot.com\/2012\/07\/msp430-launchpad-gamingpack.html\"\u003ELaunchPad                 GamingPack\u003C\/a\u003E, the BeagleBone GamingCape transforms your             BeagleBone into a full fledged hand-held gaming console capable of             playing all the classics such as NES, Gameboy, Sega GameGear, and             even Doom. Just drop in 4 AAA batteries and you'll be playing your             favourite games \u003Cstrike\u003Ediscretely at work\u003C\/strike\u003E in no time.              \u003Cbr\u003E\u003Cbr\u003E            \u003Cb\u003EPROJECT FEATURES\u003C\/b\u003E            \u003Cbr\u003E\u003Cbr\u003E            - 320x240 16Bit Color TFT LCD\u003Cbr\u003E            - Analog joystick + 2 Thumb Buttons\u003Cbr\u003E            - 3D Gyro, 3D Accelerometer, 3D Magnetometer\u003Cbr\u003E            - Headphone Out + Mic In\u003Cbr\u003E              - Supports:             \u003Cul\u003E                \u003Cli\u003ENES\u003C\/li\u003E                \u003Cli\u003EGameBoy\u003C\/li\u003E                \u003Cli\u003EGameBoy Color\u003C\/li\u003E                \u003Cli\u003EGameBoy Advance\u003C\/li\u003E                \u003Cli\u003ESega Master System\u003C\/li\u003E                \u003Cli\u003ESega Game Gear\u003C\/li\u003E                \u003Cli\u003EDoom\u003C\/li\u003E            \u003C\/ul\u003E        \u003C\/td\u003E        \u003Ctd valign=\"top\"\u003E            \u003Cp style=\"text-align:center;\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/drChce4.png\" alt=\"\" border=\"0\"\u003E\u003C\/p\u003E        \u003C\/td\u003E    \u003C\/tr\u003E\u003C\/table\u003E\u003Cbr\u003E\u003Ch1\u003EVideo\u003C\/h1\u003E\u003Chr\u003E\u003Cbr\u003E\u003Ccenter\u003E    \u003Cobject width=\"640\" height=\"360\"\u003E\u003Cparam name=\"movie\" value=\"\/\/www.youtube.com\/v\/wj1T84orbeY?hl=en_US\u0026amp;version=3\u0026amp;rel=0\"\u003E\u003C\/param\u003E\u003Cparam name=\"allowFullScreen\" value=\"true\"\u003E\u003C\/param\u003E\u003Cparam name=\"allowscriptaccess\" value=\"always\"\u003E\u003C\/param\u003E\u003Cembed src=\"\/\/www.youtube.com\/v\/wj1T84orbeY?hl=en_US\u0026amp;version=3\u0026amp;rel=0\" type=\"application\/x-shockwave-flash\" width=\"640\" height=\"360\" allowscriptaccess=\"always\" allowfullscreen=\"true\"\u003E\u003C\/embed\u003E\u003C\/object\u003E\u003C\/center\u003E\u003Cbr\u003E\u003Ca target=\"new\" href=\"http:\/\/www.youtube.com\/watch?v=wj1T84orbeY\"\u003Ehttp:\/\/www.youtube.com\/watch?v=wj1T84orbeY\u003C\/a\u003E\u003Cbr\u003E\u003Cbr\u003E\u003Ch1\u003ECape Design\u003C\/h1\u003E\u003Chr\u003E\u003Cbr\u003EThe GamingCape is a conglomerate of existing, open source, BeagleBone capes all brought together in a handheld game console form factor inspired by the original Nintendo Gameboy. The four designs that I primarily leveraged are the \u003Ca target=\"new\" href=\"http:\/\/circuitco.com\/support\/index.php?title=BeagleBone_LCD3\"\u003ELCD3\u003C\/a\u003E, \u003Ca target=\"new\" href=\"http:\/\/circuitco.com\/support\/index.php?title=BeagleBone_Audio\"\u003EAudio \u003C\/a\u003E, and  \u003Ca target=\"new\" href=\"http:\/\/circuitco.com\/support\/index.php?title=BeagleBone_Battery\"\u003EBattery\u003C\/a\u003E  capes from CircuitCo and \u003Ca target=\"new\" href=\"http:\/\/beagleboard.org\/CapeContest\/entries\/Interacto\/\"\u003EInteracto\u003C\/a\u003E by Chris Clark.  \u003Cbr\u003E\u003Cbr\u003E \u003Ccenter\u003E    \u003Ctable\u003E        \u003Ctr\u003E            \u003Ctd\u003E \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/ehuqfwy.png\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/tEB53DM.png\"\u003E\u003C\/a\u003E \u003C\/td\u003E            \u003Ctd\u003E \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/DAtoOsY.png\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/6MgR1qs.png\"\u003E\u003C\/a\u003E \u003C\/td\u003E        \u003C\/tr\u003E    \u003C\/table\u003E\u003C\/center\u003E \u003Ccenter\u003E    \u003Ctable\u003E        \u003Ctr\u003E            \u003Ctd\u003E \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/n7OqGxZ.png\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/EIJHDqT.png\"\u003E\u003C\/a\u003E \u003C\/td\u003E            \u003Ctd\u003E \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/yg4bmKk.png\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/bX5gkbL.png\"\u003E\u003C\/a\u003E \u003C\/td\u003E        \u003C\/tr\u003E    \u003C\/table\u003E\u003C\/center\u003E \u003Cbr\u003E\u003Cbr\u003E\u003Ccenter\u003E\u003Cimg width=\"700px\" src=\"http:\/\/i.imgur.com\/G9jPJKe.png\" alt=\"\"\u003E\u003C\/center\u003E \u003Cbr\u003E\u003Cbr\u003EDoing the layout was a little tricky because I had to be aware of all the areas where the case would touch the PCB. This led to some tight layouts such as the 5V power supply stuff (top layer, right below the switch). I also had to completely re-layout the 3D gyro and accelerometer components once because I had the keep-out layers disabled and didn't realize the space I was in was going to be hit. \u003Cbr\u003E\u003Cbr\u003E\u003Ccenter\u003E    \u003Ctable\u003E        \u003Ctr\u003E            \u003Ctd\u003E \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/glyBazc.png\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/tBIrMwV.png\"\u003E\u003C\/a\u003E \u003C\/td\u003E            \u003Ctd\u003E \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/3q1Vahc.png\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/W53IrpW.png\"\u003E\u003C\/a\u003E \u003C\/td\u003E        \u003C\/tr\u003E    \u003C\/table\u003E\u003C\/center\u003E\u003Cbr\u003E\u003Cbr\u003E\u003Ccenter\u003E\u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/tBiCI8c.jpg\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/U8vwIJS.jpg\"\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr\u003E\u003Cbr\u003E\u003Ccenter\u003E\u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/PB13X2R.jpg\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/c8zK4cz.jpg\"\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr\u003E\u003Cbr\u003E The schematic capture and PCB layout were done in \u003Ca target=\"new\" href=\"http:\/\/www.cadsoftusa.com\/\"\u003ECadSoft EAGLE\u003C\/a\u003E and the PCBs were fabricated by \u003Ca target=\"new\" href=\"http:\/\/silvercircuits.com\/\"\u003ESilver Circuits\u003C\/a\u003E\u003Cbr\u003E\u003Cbr\u003ESchematics, layout, and \u003Ca target=\"new\"     href=\"http:\/\/www.cadsoftusa.com\/\"\u003ECadSoft EAGLE\u003C\/a\u003E file can be found \u003Ca     target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamingcape\"\u003Ehere\u003C\/a\u003E and the bill of materials can be found \u003Ca target=\"new\" href=\"https:\/\/docs.google.com\/spreadsheet\/ccc?key=0Ageqs0usQsoRdFVYVWVuUVZUZWY2LVRaTkxnU3pneUE\u0026usp=sharing\"\u003Ehere\u003C\/a\u003E. \u003Cbr\u003E\u003Cbr\u003E \u003Ch1\u003ECase Design\u003C\/h1\u003E\u003Chr\u003E\u003Ccenter\u003E    \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/SYXc7pF.jpg\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/B4zCWzd.jpg\"\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr\u003E The whole system was completely modelled in Autodesk Inventor before most of the PCB layout was even started. This was necessary as parts of the case sit directly on the PCB and their dimensions needed to be known in order to keep out of those areas while doing the layout.  Rodney Hill of \u003Ca     target=\"new\" href=\"http:\/\/logicsupply.com\/\"\u003ELogic Supply\u003C\/a\u003E was kind enough to provide me with a great, accurate, model of the BeagleBone Black which was an enormous help. \u003Cbr\u003E\u003Cbr\u003EThe case is designed as a stack-up of 11 laser cut pieces of Delrin. I chose Delrin over ABS because of the two sample pieces I ordered from \u003Ca     target=\"new\" href=\"http:\/\/www.mcmaster.com\/#\"\u003EMcMaster\u003C\/a\u003E the Delrin seemed to be \"more black\". \u003Cbr\u003E\u003Cbr\u003E\u003Ccenter\u003E\u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/8EbyHXv.png\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/kgVTsWU.png\"\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr\u003EAn exploded view of the stack up: \u003Ccenter\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/0ExsquX.png\"\u003E\u003C\/center\u003E\u003Cbr\u003E\u003Cbr\u003EThe case is locked together by screws on either side which thread into a hex standoffs. The standoffs are locked into place and prevented from spinning by hex cutouts in the first 4 plates under the PCB. \u003Cbr\u003E\u003Cbr\u003E\u003Ccenter\u003E    \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/FZ4db2A.png\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/5YYZ8qP.png\"\u003E\u003C\/a\u003E\u003C\/center\u003E  I was fortunate enough to have access to a 3D printer and was able to print the whole case and ensure all of my dimensions were 'close enough' before I paid for it to be laser cut. \u003Cbr\u003E\u003Cbr\u003E\u003Ccenter\u003E    \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/QVS7FyS.jpg\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/nHRdwPd.jpg\"\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr\u003E\u003Cbr\u003EIn order to reduce fabrication costs it was important to use as few different thicknesses as possible. All pieces in my design are cut from 1\/8\" and 1\/32\" sheets. The layouts that I sent to get cut are for 24\"x12\" sheets and yield enough pieces to build two cases: \u003Cbr\u003E\u003Cbr\u003E \u003Ccenter\u003E\u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/uunEBz3.png\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/My2FyO1.png\"\u003E\u003C\/a\u003E\u003Cbr\u003E\u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/fm2RVn4.png\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/s4rPGV9.png\"\u003E\u003C\/a\u003E\u003Cbr\u003E\u003C\/center\u003E\u003Cbr\u003EAll the layers required for one case: \u003Cbr\u003E\u003Cbr\u003E\u003Ccenter\u003E\u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/1Sm7Kro.jpg\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/hmrvrV8.jpg\"\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr\u003E \u003Ccenter\u003E    \u003Ctable\u003E        \u003Ctr\u003E            \u003Ctd\u003E \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/ypKCo5U.jpg\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/SuzHmnf.jpg\"\u003E\u003C\/a\u003E \u003C\/td\u003E            \u003Ctd\u003E \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/fcyoBkB.jpg\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/ylefHEd.jpg\"\u003E\u003C\/a\u003E \u003C\/td\u003E        \u003C\/tr\u003E    \u003C\/table\u003E\u003C\/center\u003E\u003Cbr\u003E\u003Cbr\u003E\u003Ccenter\u003E    \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/BK8nRUo.jpg\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/C93sOYI.jpg\"\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr\u003E\u003Cbr\u003E\u003Ccenter\u003E    \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/NKhqh2n.jpg\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/2qvDoz0.jpg\"\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr\u003E\u003Cbr\u003EAll of the 3D design files can be found here: \u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamingcape\/tree\/master\/enclosure\"\u003Ehttps:\/\/github.com\/bear24rw\/gamingcape\/tree\/master\/enclosure\u003C\/a\u003E\u003Cbr\u003E\u003Cbr\u003E\u003Ch1\u003EGames\u003C\/h1\u003E\u003Chr\u003E\u003Cbr\u003EGetting the emulators up and running on the BeagleBone proved to be a little challenging. It seems that a lot of the Linux emulators aren't actively maintained and wont even compile. Lucky, Gentoo maintains patches for a few of them and I was able to use portage to fetch a patched source tree. \u003Cbr\u003E\u003Cbr\u003EFor the NES emulator, fceux, I was able to fetch, unpack, and patch the source on my Gentoo host and then send it to the BeagleBone where I compiled it natively. Fceux seems to work fine although I did have to patch it to center the screen: \u003Cbr\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamingcape_fceu\/commit\/ac1555d7d562ee15479374c4be103a994670e4ab\"\u003Ehttps:\/\/github.com\/bear24rw\/gamingcape_fceu\/commit\/ac1555d7d562ee15479374c4be103a994670e4ab\u003C\/a\u003E\u003Cbr\u003E\u003Cbr\u003EFor the Gameboy emulators it seemed that VisualBoyAdvance was the go-to. Again I got a patched version from portage and tried to compile it on the BeagleBone but it not only took ages but also ate up an enormous amount of RAM. At one point I was using a USB flash drive as swap space. Needless to say it failed to compile. I ended up just cross compiling it which seemed to work okay even though I didn't really setup a proper environment and was using my hosts systems header files. \u003Cbr\u003E\u003Cbr\u003EFor Doom I was lucky enough to find a \u003Ca target=\"new\" href=\"https:\/\/github.com\/aserebryakov\/sdl_doom\"\u003ESDL port\u003C\/a\u003E that pretty much \"just worked\" which was refreshing after I tried half a dozen others which wouldn't even build. \u003Cbr\u003E\u003Cbr\u003EFor Osmose I found a \u003Ca target=\"new\" href=\"http:\/\/www.raspberrypi.org\/phpBB3\/viewtopic.php?f=78\u0026t=23550\"\u003Eforum post\u003C\/a\u003E where someone had gotten it to run on a Raspberry PI.  It pretty much \"just worked\" too. \u003Cbr\u003E\u003Cbr\u003EThe common issue that all the emulators share is that they are using SDL to render and the BeagleBone doesn't really support OpenGL. This means that it's really expensive to scale the screen up in non-integer units. You'll notice in my video that all the emulators were running at the original systems native resolution. \u003Cbr\u003E\u003Cbr\u003EAll the emulators that I patched and got working are hosted on my github: \u003Cbr\u003E\u003Cbr\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamingcape_osmose\"\u003Ehttps:\/\/github.com\/bear24rw\/gamingcape_osmose\u003C\/a\u003E\u003Cbr\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamingcape_vba\"\u003Ehttps:\/\/github.com\/bear24rw\/gamingcape_vba\u003C\/a\u003E\u003Cbr\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamingcape_fceu\"\u003Ehttps:\/\/github.com\/bear24rw\/gamingcape_fceu\u003C\/a\u003E\u003Cbr\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamingcape_doom\"\u003Ehttps:\/\/github.com\/bear24rw\/gamingcape_doom\u003C\/a\u003E  \u003Cbr\u003E\u003Cbr\u003E\u003C\/p\u003E\u003Ch1\u003EResources\u003C\/h1\u003E\u003Chr\u003E\u003Cp\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamingcape\"\u003Ehttps:\/\/github.com\/bear24rw\/gamingcape\u003C\/a\u003E\u003Cbr\u003E \u003Ca target=\"new\" href=\"http:\/\/hipstercircuits.com\/enable-serialuarttty-on-beaglebone-black\/\"\u003E    http:\/\/hipstercircuits.com\/enable-serialuarttty-on-beaglebone-black\/ \u003C\/a\u003E\u003Cbr\u003E\u003Ca target=\"new\" href=\"http:\/\/azkeller.com\/blog\/?p=62\"\u003E    http:\/\/azkeller.com\/blog\/?p=62 \u003C\/a\u003E\u003Cbr\u003E\u003Ca target=\"new\" href=\"http:\/\/wiki.beyondlogic.org\/index.php\/BeagleBoneBlack_Building_Kernel\"\u003E    http:\/\/wiki.beyondlogic.org\/index.php\/BeagleBoneBlack_Building_Kernel \u003C\/a\u003E\u003Cbr\u003E\u003Ca target=\"new\" href=\"http:\/\/www.armhf.com\/index.php\/using-beaglebone-black-gpios\/\"\u003E    http:\/\/www.armhf.com\/index.php\/using-beaglebone-black-gpios\/ \u003C\/a\u003E\u003Cbr\u003E\u003Ca target=\"new\" href=\"http:\/\/beaglebone.cameon.net\/home\/reading-the-analog-inputs-adc\"\u003E    http:\/\/beaglebone.cameon.net\/home\/reading-the-analog-inputs-adc \u003C\/a\u003E\u003Cbr\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/beagleboard\/kernel\/tree\/3.8\"\u003E    https:\/\/github.com\/beagleboard\/kernel\/tree\/3.8 \u003C\/a\u003E\u003Cbr\u003E\u003Ca target=\"new\" href=\"http:\/\/www.eewiki.net\/display\/linuxonarm\/BeagleBone+Black#BeagleBoneBlack-InstallBootloaders\"\u003E    http:\/\/www.eewiki.net\/display\/linuxonarm\/BeagleBone+Black#BeagleBoneBlack-InstallBootloaders \u003C\/a\u003E \u003Cbr\u003E\u003C\/p\u003E"},"link":[{"rel":"replies","type":"application/atom+xml","href":"http:\/\/bear24rw.blogspot.com\/feeds\/6594882444136163650\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/2013\/07\/beaglebone-gamingcape.html#comment-form","title":"115 Comments"},{"rel":"edit","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default\/6594882444136163650"},{"rel":"self","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default\/6594882444136163650"},{"rel":"alternate","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/2013\/07\/beaglebone-gamingcape.html","title":"BeagleBone GamingCape"}],"author":[{"name":{"$t":"Max Thrun"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/18216963066514872707"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"http:\/\/img1.blogblog.com\/img\/b16-rounded.gif"}}],"thr$total":{"$t":"115"}},{"id":{"$t":"tag:blogger.com,1999:blog-3623515592551780770.post-3727123250671373421"},"published":{"$t":"2012-07-28T11:16:00.000-04:00"},"updated":{"$t":"2012-07-30T15:30:04.726-04:00"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"booster"},{"scheme":"http://www.blogger.com/atom/ns#","term":"boosterpack"},{"scheme":"http://www.blogger.com/atom/ns#","term":"challenge"},{"scheme":"http://www.blogger.com/atom/ns#","term":"design"},{"scheme":"http://www.blogger.com/atom/ns#","term":"fpga"},{"scheme":"http://www.blogger.com/atom/ns#","term":"gameduino"},{"scheme":"http://www.blogger.com/atom/ns#","term":"gamepack"},{"scheme":"http://www.blogger.com/atom/ns#","term":"gamingpack"},{"scheme":"http://www.blogger.com/atom/ns#","term":"hot air"},{"scheme":"http://www.blogger.com/atom/ns#","term":"intern"},{"scheme":"http://www.blogger.com/atom/ns#","term":"launchpad"},{"scheme":"http://www.blogger.com/atom/ns#","term":"msp430"},{"scheme":"http://www.blogger.com/atom/ns#","term":"pcb"},{"scheme":"http://www.blogger.com/atom/ns#","term":"soldering"},{"scheme":"http://www.blogger.com/atom/ns#","term":"surface mount"},{"scheme":"http://www.blogger.com/atom/ns#","term":"texas instruments"},{"scheme":"http://www.blogger.com/atom/ns#","term":"TI"},{"scheme":"http://www.blogger.com/atom/ns#","term":"verilog"},{"scheme":"http://www.blogger.com/atom/ns#","term":"xilinx"}],"title":{"type":"text","$t":"MSP430 Launchpad GamingPack"},"content":{"type":"html","$t":"\u003Ctable border=\"0\"\u003E    \u003Ctr\u003E        \u003Ctd valign=\"top\"\u003E            \u003Cb\u003ETEAM MEMBERS\u003C\/b\u003E            \u003Cbr\u003E\u003Cbr\u003E            Max Thrun\u003Cbr\u003E            Brittany Finch\u003Cbr\u003E            Kathleen Foster\u003Cbr\u003E            \u003Cbr\u003E            \u003Cb\u003EPROJECT DESCRIPTION\u003C\/b\u003E            \u003Cbr\u003E\u003Cbr\u003E            Based on the \u003Ca target=\"new\" href='http:\/\/excamera.com\/sphinx\/gameduino\/'\u003EGameduino\u003C\/a\u003E, the GamingPack transforms your MSP430 LaunchPad into a full fledged gaming console complete with audio \/ video output and two Nintendo controller sockets. Just hookup your computer monitor, plug in a controller and you'll be writing games in no time.             \u003Cbr\u003E\u003Cbr\u003E            \u003Cb\u003EPROJECT FEATURES\u003C\/b\u003E            \u003Cbr\u003E\u003Cbr\u003E            - 400x300 Pixel VGA output\u003Cbr\u003E            - 256 16x16 Pixel simultaneous sprite images\u003Cbr\u003E            - Up to 256 colors per sprite\u003Cbr\u003E            - 2 Nintendo (NES) controllers\u003Cbr\u003E              - Nostalgia\u003Cbr\u003E        \u003C\/td\u003E        \u003Ctd valign=\"top\"\u003E            \u003Cp style=\"text-align:center;\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/gmE9z.png\" alt=\"\" border=\"0\"\u003E\u003C\/p\u003E        \u003C\/td\u003E    \u003C\/tr\u003E\u003C\/table\u003E\u003Cbr\u003E\u003Ch1\u003EVideo\u003C\/h1\u003E\u003Chr\u003E\u003Cbr\u003E\u003Ccenter\u003E\u003Cobject width=\"640\" height=\"360\"\u003E\u003Cparam name=\"movie\" value=\"http:\/\/www.youtube.com\/v\/hDE0ZfmsVrw?version=3\u0026amp;hl=en_US\"\u003E\u003C\/param\u003E\u003Cparam name=\"allowFullScreen\" value=\"true\"\u003E\u003C\/param\u003E\u003Cparam name=\"allowscriptaccess\" value=\"always\"\u003E\u003C\/param\u003E\u003Cembed src=\"http:\/\/www.youtube.com\/v\/hDE0ZfmsVrw?version=3\u0026amp;hl=en_US\" type=\"application\/x-shockwave-flash\" width=\"640\" height=\"360\" allowscriptaccess=\"always\" allowfullscreen=\"true\"\u003E\u003C\/embed\u003E\u003C\/object\u003E\u003C\/center\u003E\u003Cbr\u003E\u003Ca target=\"new\" href=\"http:\/\/www.youtube.com\/watch?v=hDE0ZfmsVrw\"\u003Ehttp:\/\/www.youtube.com\/watch?v=hDE0ZfmsVrw\u003C\/a\u003E\u003Cbr\u003E\u003Cbr\u003E\u003Ch1\u003EDesign\u003C\/h1\u003E\u003Chr\u003E\u003Cbr\u003EThe schematic capture and PCB layout were done in \u003Ca target=\"new\" href=\"http:\/\/www.cadsoftusa.com\/\"\u003ECadSoft EAGLE\u003C\/a\u003E. The PCBs were fabricated by \u003Ca target=\"new\" href=\"http:\/\/silvercircuits.com\/\"\u003ESilver Circuits\u003C\/a\u003E        \u003Cbr\u003E\u003Cbr\u003E        \u003Ccenter\u003E            \u003Ctable\u003E \u003Ctr\u003E                    \u003Ctd\u003E \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/HHlrv.png\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/C0p1L.png\"\u003E\u003C\/a\u003E \u003C\/td\u003E                    \u003Ctd\u003E \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/zQ4XT.png\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/fDMQl.png\"\u003E\u003C\/a\u003E \u003C\/td\u003E            \u003C\/tr\u003E\u003C\/table\u003E            \u003Cbr\u003E            \u003Cimg src=\"http:\/\/i.imgur.com\/71w43.png\"\u003E            \u003Cbr\u003E\u003Cbr\u003E            \u003Cimg src=\"http:\/\/i.imgur.com\/r9fbJ.png\"\u003E             \u003Cbr\u003E            \u003Cbr\u003E            \u003Cbr\u003E            \u003Cimg src=\"http:\/\/i.imgur.com\/2uUXd.png\" alt=\"\"\u003E        \u003C\/center\u003E         \u003Cbr\u003E        \u003Cbr\u003E        \u003Cbr\u003E        The GamePack is designed around a Xilinx Spartan 3A 200K Gate FPGA. It implements the same sprite rendering core as the \u003Ca target=\"new\" href=\"http:\/\/excamera.com\/sphinx\/gameduino\/\"\u003EGameduino\u003C\/a\u003E and communicates to the LaunchPad via SPI. The FPGA bitstream configuration is stored on an external EEPROM which was programed using a \u003Ca target=\"new\" href=\"http:\/\/www.ftdichip.com\/Products\/ICs\/FT2232D.htm\"\u003EFTDI FT2232D\u003C\/a\u003E development board and \u003Ca target=\"new\" href=\"http:\/\/flashrom.org\/Flashrom\"\u003EFlashrom\u003C\/a\u003E in Linux. The FPGA 1.2V internal core voltage is provided by a TI TLV70212 low drop out regulator.         \u003Cbr\u003E\u003Cbr\u003E        A resistor DAC provides the various voltage levels for the VGA interface and audio is achieved by passing 2 channels of digital audio through a 4KHz low pass filter. An optional SPI EEPROM can be installed to store large game data such as images and level maps. Two status LEDs indicate power and SPI data transfer to the FPGA.         \u003Cbr\u003E\u003Cbr\u003E        2 Nintendo (NES) \u003Ca target=\"new\" href=\"http:\/\/www.parallax.com\/StoreSearchResults\/tabid\/768\/txtSearch\/nes\/List\/0\/SortField\/4\/ProductID\/522\/Default.aspx\"\u003Econtroller sockets\u003C\/a\u003E are included to provide a classic gaming experience. They are ideal for this project as the interface is simple and they can be easily purchased online or simply found in a box in your closet.         \u003Cbr\u003E        \u003Cbr\u003E        \u003Cbr\u003E        \u003Cbr\u003E        \u003Cbr\u003E\u003Ccenter\u003E        \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/YesCN.jpg\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/fR1iX.jpg\"\u003E\u003C\/a\u003E        \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/3Bu7Q.jpg\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/iOmXz.jpg\"\u003E\u003C\/a\u003E        \u003Cbr\u003E\u003Cbr\u003E             \u003Cbr\u003E\u003Cbr\u003E             \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/kMz64.jpg\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/sswhx.jpg\"\u003E\u003C\/a\u003E\u003Cbr\u003E        With only a month and a half to complete this project designing for test was important. The GamingPack includes a 10 pin header that can plug directly into a \u003Ca target=\"new\" href=\"http:\/\/www.saleae.com\/logic\/\"\u003ESaleae Logic Analyzer\u003C\/a\u003E        \u003Cbr\u003E\u003Cbr\u003E             \u003Cbr\u003E\u003Cbr\u003E             \u003Cbr\u003E\u003Cbr\u003E              \u003Ca target=\"new\" href=\"http:\/\/i.imgur.com\/8BdXx.jpg\"\u003E\u003Cimg src=\"http:\/\/i.imgur.com\/bjB4S.png\"\u003E\u003C\/a\u003E\u003Cbr\u003E\u003C\/center\u003E        \u003Cbr\u003E\u003Cbr\u003E             \u003Cbr\u003E\u003Cbr\u003E             Schematics, layout, and \u003Ca target=\"new\" href=\"http:\/\/www.cadsoftusa.com\/\"\u003ECadSoft EAGLE\u003C\/a\u003E file can be found \u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamepack\/tree\/master\/schematics\"\u003Ehere\u003C\/a\u003E.                 \u003Cbr\u003E                \u003Cbr\u003E                 \u003Ch1\u003EBasic Examples\u003C\/h1\u003E                \u003Chr\u003E                \u003Cp\u003E                Several basic examples were developed to demonstrate and show off the various functionality of the GamingPack.                 \u003Cbr\u003E                \u003Cbr\u003E\u003Ccenter\u003E                \u003Ctable style=\"width:auto;\"\u003E\u003Ccol width=\"350\" \/\u003E\u003Ccol width=\"20\" \/\u003E\u003Ccol width=\"350\" \/\u003E                    \u003Ctr\u003E                        \u003Ctd\u003E                            \u003Cimg src=\"http:\/\/i.imgur.com\/dyKTv.png\" alt=\"\" \/\u003E\u003C\/a\u003E                            \u003Cbr\u003E\u003Cbr\u003E                            \u003Cb\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamepack\/tree\/master\/code\/examples\/basics\/sprites_256\"\u003Esprites_256\u003C\/a\u003E\u003C\/b\u003E - Demonstates the hardwares ability to draw up to 256 sprites simultaneously                             \u003Cbr\u003E\u003Cbr\u003E                        \u003C\/td\u003E\u003Ctd\u003E\u003C\/td\u003E                        \u003Ctd\u003E                            \u003Cimg src=\"http:\/\/i.imgur.com\/alvTn.png\" alt=\"\" \/\u003E\u003C\/a\u003E                            \u003Cbr\u003E\u003Cbr\u003E                            \u003Cb\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamepack\/tree\/master\/code\/examples\/basics\/palettes\"\u003Epalettes\u003C\/a\u003E\u003C\/b\u003E - Shows each of the different color palette modes                             \u003Cbr\u003E\u003Cbr\u003E                        \u003C\/td\u003E                    \u003C\/tr\u003E                    \u003Ctr\u003E                        \u003Ctd\u003E                            \u003Cimg src=\"http:\/\/i.imgur.com\/5aNGW.png\" alt=\"\" \/\u003E\u003C\/a\u003E                            \u003Cbr\u003E\u003Cbr\u003E                            \u003Cb\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamepack\/tree\/master\/code\/examples\/basics\/scroll\"\u003Escroll\u003C\/a\u003E\u003C\/b\u003E - Randomly generated scrolling terrain to show off the hardwares ability to smoothly scroll backgroud images                              \u003Cbr\u003E\u003Cbr\u003E                        \u003C\/td\u003E\u003Ctd\u003E\u003C\/td\u003E                        \u003Ctd\u003E                            \u003Cimg src=\"http:\/\/i.imgur.com\/9UFZN.png\" alt=\"\" \/\u003E\u003C\/a\u003E                            \u003Cbr\u003E\u003Cbr\u003E                            \u003Cb\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamepack\/tree\/master\/code\/examples\/basics\/rotate\"\u003Erotate\u003C\/a\u003E\u003C\/b\u003E - Example program showing the different rotation and mirror options                             \u003Cbr\u003E\u003Cbr\u003E                        \u003C\/td\u003E                    \u003C\/tr\u003E                    \u003Ctr\u003E                        \u003Ctd\u003E                            \u003Cimg src=\"http:\/\/i.imgur.com\/5D8YN.png\" alt=\"\" \/\u003E\u003C\/a\u003E                            \u003Cbr\u003E\u003Cbr\u003E                            \u003Cb\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamepack\/tree\/master\/code\/examples\/basics\/controllers\"\u003Econtrollers\u003C\/a\u003E\u003C\/b\u003E - Small program to show how to read the NES controllers                             \u003Cbr\u003E\u003Cbr\u003E                        \u003C\/td\u003E\u003Ctd\u003E\u003C\/td\u003E                        \u003Ctd\u003E                            \u003Cimg src=\"http:\/\/i.imgur.com\/X0aYV.png\" alt=\"\" \/\u003E\u003C\/a\u003E                            \u003Cbr\u003E\u003Cbr\u003E                            \u003Cb\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamepack\/tree\/master\/code\/examples\/basics\/background\"\u003Ebackground\u003C\/a\u003E\u003C\/b\u003E - Simple program showing how to display a background image                             \u003Cbr\u003E\u003Cbr\u003E                        \u003C\/td\u003E                    \u003C\/tr\u003E                    \u003Ctr\u003E                        \u003Ctd\u003E                            \u003Cimg src=\"http:\/\/i.imgur.com\/1DBG0.png\" alt=\"\" \/\u003E\u003C\/a\u003E                            \u003Cbr\u003E\u003Cbr\u003E                            \u003Cb\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamepack\/tree\/master\/code\/examples\/basics\/random_numbers\"\u003Erandom_numbers\u003C\/a\u003E\u003C\/b\u003E - Shows how to use random numbers and draw text                             \u003Cbr\u003E\u003Cbr\u003E                        \u003C\/td\u003E\u003Ctd\u003E\u003C\/td\u003E                        \u003Ctd\u003E                            \u003Cimg src=\"http:\/\/i.imgur.com\/OaqUe.png\" alt=\"\" \/\u003E\u003C\/a\u003E                            \u003Cbr\u003E\u003Cbr\u003E                            \u003Cb\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamepack\/tree\/master\/code\/examples\/basics\/sprite_walking\"\u003Esprite_walking\u003C\/a\u003E\u003C\/b\u003E - Example showing to how create a smooth walking animation                             \u003Cbr\u003E\u003Cbr\u003E                        \u003C\/td\u003E                    \u003C\/tr\u003E                \u003C\/table\u003E\u003C\/center\u003E        \u003Cbr\u003E\u003Cbr\u003E        Source code for these basic examples: \u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamepack\/tree\/master\/code\/examples\/basics\"\u003Ehttps:\/\/github.com\/bear24rw\/gamepack\/tree\/master\/code\/examples\/basics\u003C\/a\u003E        \u003Cbr\u003E\u003Cbr\u003E        \u003Ch1\u003EGame Examples\u003C\/h1\u003E        \u003Chr\u003E        \u003Cp\u003E        The GamingPack wouldn't be a gaming pack without a few games.         \u003Cbr\u003E        \u003Ccenter\u003E            \u003Cbr\u003E            \u003Cimg src=\"https:\/\/github.com\/bear24rw\/gamepack\/raw\/master\/code\/examples\/games\/breakout\/breakout.png\" alt=\"\"\/\u003E            \u003Cbr\u003E            \u003Cbr\u003E            \u003Cb\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamepack\/tree\/master\/code\/examples\/games\/breakout\"\u003EBreakout \/ Brick Breaker\u003C\/a\u003E\u003C\/b\u003E            \u003Cbr\u003E            \u003Cbr\u003E            \u003Cbr\u003E            \u003Cbr\u003E            \u003Cimg src=\"https:\/\/github.com\/bear24rw\/gamepack\/raw\/master\/code\/examples\/games\/tetris\/tetris.png\" alt=\"\"\u003E            \u003Cbr\u003E            \u003Cbr\u003E            \u003Cb\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamepack\/tree\/master\/code\/examples\/games\/tetris\"\u003ETetris\u003C\/a\u003E\u003C\/b\u003E            \u003Cbr\u003E            \u003Cbr\u003E            \u003Cbr\u003E            \u003Cbr\u003E            \u003Cimg src=\"https:\/\/github.com\/bear24rw\/gamepack\/raw\/master\/code\/examples\/games\/space_invaders\/space_invaders.png\" alt=\"\"\u003E            \u003Cbr\u003E            \u003Cbr\u003E            \u003Cb\u003E\u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamepack\/tree\/master\/code\/examples\/games\/space_invaders\"\u003ESpace Invaders\u003C\/a\u003E\u003C\/b\u003E            \u003Cbr\u003E            \u003Cbr\u003E        \u003C\/center\u003E        \u003Cbr\u003E        \u003Cbr\u003E        Source code for the game examples: \u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamepack\/tree\/master\/code\/examples\/games\"\u003Ehttps:\/\/github.com\/bear24rw\/gamepack\/tree\/master\/code\/examples\/games\u003C\/a\u003E        \u003C\/p\u003E         \u003Cbr\u003E\u003C\/p\u003E        \u003Ch1\u003EResources\u003C\/h1\u003E        \u003Chr\u003E        \u003Cp\u003E        \u003Ca target=\"new\" href=\"https:\/\/github.com\/bear24rw\/gamepack\"\u003Ehttps:\/\/github.com\/bear24rw\/gamepack\u003C\/a\u003E\u003Cbr\u003E        \u003Ca target=\"new\" href=\"http:\/\/excamera.com\/sphinx\/gameduino\/\"\u003Ehttp:\/\/excamera.com\/sphinx\/gameduino\u003C\/a\u003E\u003Cbr\u003E                \u003Cbr\u003E\u003C\/p\u003E"},"link":[{"rel":"replies","type":"application/atom+xml","href":"http:\/\/bear24rw.blogspot.com\/feeds\/3727123250671373421\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/2012\/07\/msp430-launchpad-gamingpack.html#comment-form","title":"25 Comments"},{"rel":"edit","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default\/3727123250671373421"},{"rel":"self","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default\/3727123250671373421"},{"rel":"alternate","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/2012\/07\/msp430-launchpad-gamingpack.html","title":"MSP430 Launchpad GamingPack"}],"author":[{"name":{"$t":"Max Thrun"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/18216963066514872707"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"http:\/\/img1.blogblog.com\/img\/b16-rounded.gif"}}],"thr$total":{"$t":"25"}},{"id":{"$t":"tag:blogger.com,1999:blog-3623515592551780770.post-2901294828335217054"},"published":{"$t":"2011-08-26T00:10:00.008-04:00"},"updated":{"$t":"2011-08-26T00:16:32.907-04:00"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"c"},{"scheme":"http://www.blogger.com/atom/ns#","term":"coffee table"},{"scheme":"http://www.blogger.com/atom/ns#","term":"coop"},{"scheme":"http://www.blogger.com/atom/ns#","term":"coop design challenge"},{"scheme":"http://www.blogger.com/atom/ns#","term":"max thrun"},{"scheme":"http://www.blogger.com/atom/ns#","term":"msp430"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Programming"},{"scheme":"http://www.blogger.com/atom/ns#","term":"texas instruments"},{"scheme":"http://www.blogger.com/atom/ns#","term":"thrun"},{"scheme":"http://www.blogger.com/atom/ns#","term":"TI"}],"title":{"type":"text","$t":"RGB LED Coffee Table"},"content":{"type":"html","$t":"This summer all the Co-ops at Texas Instruments were challenged with coming up with a project centered around a \u003Ca target=\"new\" href=\"http:\/\/ti.com\/430value\"\u003Evalue line MSP430\u003C\/a\u003E. My group decided to build an RGB LED coffee table that pulsed visualization to music. We won 1st place!\r\u003Cbr \/\u003E\r\u003Cbr \/\u003EA write up of the project can be found \u003Ca target=\"new\" href=\"http:\/\/e2e.ti.com\/group\/msp430launchpad\/m\/project\/447779.aspx\"\u003Ehere\u003C\/a\u003E \r\u003Cbr \/\u003E\r\u003Cbr \/\u003E\u003Ccenter\u003E\r\u003Cbr \/\u003E\u003Ca target=\"new\" href=\"http:\/\/e2e.ti.com\/group\/msp430launchpad\/m\/project\/447779.aspx\"\u003E\u003Cimg src=\"https:\/\/lh4.googleusercontent.com\/-u1rAbqcEMO8\/TjDwnB9TzgI\/AAAAAAAABMU\/UaEcguy1IzY\/s400\/CIMG3895.JPG\" height=\"400\" width=\"300\" \/\u003E\u003C\/a\u003E\u003C\/center\u003E"},"link":[{"rel":"replies","type":"application/atom+xml","href":"http:\/\/bear24rw.blogspot.com\/feeds\/2901294828335217054\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/2011\/08\/rgb-led-coffee-table.html#comment-form","title":"1 Comments"},{"rel":"edit","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default\/2901294828335217054"},{"rel":"self","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default\/2901294828335217054"},{"rel":"alternate","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/2011\/08\/rgb-led-coffee-table.html","title":"RGB LED Coffee Table"}],"author":[{"name":{"$t":"Max Thrun"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/18216963066514872707"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"http:\/\/img1.blogblog.com\/img\/b16-rounded.gif"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https:\/\/lh4.googleusercontent.com\/-u1rAbqcEMO8\/TjDwnB9TzgI\/AAAAAAAABMU\/UaEcguy1IzY\/s72-c\/CIMG3895.JPG","height":"72","width":"72"},"thr$total":{"$t":"1"}},{"id":{"$t":"tag:blogger.com,1999:blog-3623515592551780770.post-8523842852936678304"},"published":{"$t":"2010-08-11T22:01:00.016-04:00"},"updated":{"$t":"2013-03-26T21:56:13.618-04:00"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"code"},{"scheme":"http://www.blogger.com/atom/ns#","term":"jansen"},{"scheme":"http://www.blogger.com/atom/ns#","term":"kinematics"},{"scheme":"http://www.blogger.com/atom/ns#","term":"matlab"},{"scheme":"http://www.blogger.com/atom/ns#","term":"mechanics"},{"scheme":"http://www.blogger.com/atom/ns#","term":"simulation"},{"scheme":"http://www.blogger.com/atom/ns#","term":"theo"}],"title":{"type":"text","$t":"Theo Jansen Matlab Simulation"},"content":{"type":"html","$t":"My roommate had to do a simulation of a Jansen mechanism for his kinematics class. It sounded interesting so I gave it a try. Here is what I came up with:\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/4884166878\/\" title=\"Screenshot-14-cropped by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm5.static.flickr.com\/4073\/4884166878_93557a0472.jpg\" width=\"500\" height=\"436\" alt=\"Screenshot-14-cropped\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Cobject width=\"480\" height=\"385\"\u003E\u003Cparam name=\"movie\" value=\"http:\/\/www.youtube.com\/v\/lsl6992-tqA?fs=1\u0026amp;hl=en_US\"\u003E\u003C\/param\u003E\u003Cparam name=\"allowFullScreen\" value=\"true\"\u003E\u003C\/param\u003E\u003Cparam name=\"allowscriptaccess\" value=\"always\"\u003E\u003C\/param\u003E\u003Cembed src=\"http:\/\/www.youtube.com\/v\/lsl6992-tqA?fs=1\u0026amp;hl=en_US\" type=\"application\/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"480\" height=\"385\"\u003E\u003C\/embed\u003E\u003C\/object\u003E\u003Cbr \/\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EDoing a simulation of a mechanical linkage was something I had never done, nor even really thought about. I initially tried to express all the angles as functions of each other but this soon became insane (this could very well be due to the fact that I am in Electrical Engineering and have never taken a kinematics course before so I had no idea what the proper equations would even look like). After trying to simplify gigantic trig equations in wolframalpha.com and getting back stuff that was disgustingly crazy I resorted to my middle school way of solving equations I don't really understand: brute force. (I used to make programs on my TI-83 to brute force single (and even double) variable equations way back in the day)\u003Cbr \/\u003E\u003Cbr \/\u003ESo there was only three things I really had values for: the length of the legs, the distance between the crank and the pivot, and the angle of the crank. So say the crank is at a certain angle and you know its length, you can find the end point x,y using simple sin and cos. Now the end of the crank (node 0) needs to be connected to node 1. Node 1 is a known length off the pivot, link_9. So basically what I do is rotate link_9 around the pivot until the distance between node 1 and node 0 are extremely close to the length of link_1. I find this really hard to explain still even after trying to do it many times. Basically I brute force the angle of a bar until the tip of the bar is a certain length away from the other bar it needs to connect to (the distance which I know, since I know the length of all the legs).\u003Cbr \/\u003E\u003Cbr \/\u003EEven though this method is absolutely confusing to explain in words it is extremely modular and dead simple to implement. The code is basically the same thing over and over again just with different bars and also some angle constraints (you know link_9 will always be between 45 and 135, roughly). Adding new bars is as simple as copy and pasting and changing the names of the variables. I can literally make any mechanism this way without doing a single line of hard coded trig.\u003Cbr \/\u003E\u003Cbr \/\u003EI found the paper linked below to be extremely helpful for providing good bar lengths. All the nodes and bars in my code are named the same as those in this paper\u003Cbr \/\u003E\u003Ca href=\"http:\/\/ujdigispace.uj.ac.za:8080\/dspace\/bitstream\/10210\/1738\/Numerical.pdf\"\u003Ehttp:\/\/ujdigispace.uj.ac.za:8080\/dspace\/bitstream\/10210\/1738\/39\/Numerical.pdf\u003C\/a\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-weight:bold;\"\u003EEdit:\u003C\/span\u003E For some reason the link does not work, to find the paper google: \"Numerical kinematic and kinetic analysis of a new class of twelve bar linkage for walking machines\"\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E \u003Cpre class=\"brush: matlab;\" id=\"sh3-123\"\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E%Max Thrun\u003Cbr \/\u003E%Simulation of Jensen Mechanism\u003Cbr \/\u003E\u003Cbr \/\u003Eclose all               %Clsoes windows\u003Cbr \/\u003Eclear all               %Clears all variables\u003Cbr \/\u003Eclc                     %Clear command window\u003Cbr \/\u003E\u003Cbr \/\u003E%Declare variables\u003Cbr \/\u003E\u003Cbr \/\u003Ecrank_r = 120;\u003Cbr \/\u003Elink_1 = 400;\u003Cbr \/\u003Elink_2 = 389;%400;\u003Cbr \/\u003Elink_3 = 275;\u003Cbr \/\u003Elink_4 = 400;\u003Cbr \/\u003Elink_5 = 275;\u003Cbr \/\u003Elink_6 = 400;\u003Cbr \/\u003Elink_7 = 275;\u003Cbr \/\u003Elink_8 = 275;\u003Cbr \/\u003Elink_9 = 275;\u003Cbr \/\u003Elink_10 = 275;\u003Cbr \/\u003Elink_11 = 412;%540;\u003Cbr \/\u003E\u003Cbr \/\u003Ecrank_x = 0;\u003Cbr \/\u003Ecrank_y = 0;\u003Cbr \/\u003E\u003Cbr \/\u003Epin_x = crank_x - (286\/1);\u003Cbr \/\u003Epin_y = crank_y;\u003Cbr \/\u003E\u003Cbr \/\u003Enode_1_x = pin_x;\u003Cbr \/\u003Enode_1_y = 5;\u003Cbr \/\u003E\u003Cbr \/\u003Elink_9_t = 0;\u003Cbr \/\u003E\u003Cbr \/\u003Elink_10_t = pi;\u003Cbr \/\u003Elink_11_t = pi;\u003Cbr \/\u003E\u003Cbr \/\u003Enode_2_x = pin_x - link_9;\u003Cbr \/\u003Enode_2_y = pin_y;\u003Cbr \/\u003E\u003Cbr \/\u003Elink_8_t = 3\/4*pi;\u003Cbr \/\u003E\u003Cbr \/\u003Enode_3_x = pin_x;\u003Cbr \/\u003Enode_3_y = pin_y - link_8;\u003Cbr \/\u003E\u003Cbr \/\u003Elink_7_t = pi;\u003Cbr \/\u003E\u003Cbr \/\u003Enode_4_x = pin_x - link_7;\u003Cbr \/\u003Enode_4_y = pin_y - link_3;\u003Cbr \/\u003E\u003Cbr \/\u003Elink_5_t = 3\/4*pi;\u003Cbr \/\u003E\u003Cbr \/\u003Enode_5_y = pin_y - link_8 - link_5;\u003Cbr \/\u003Enode_5_x = pin_x;\u003Cbr \/\u003E\u003Cbr \/\u003Enode_6_y = node_5_y;\u003Cbr \/\u003Enode_6_x = node_5_x;\u003Cbr \/\u003E\u003Cbr \/\u003Eaxis([-300 300 -300 300]);\u003Cbr \/\u003Egrid on                 %Display grid on plot\u003Cbr \/\u003Exlabel('real axis');    %Give the xlabel\u003Cbr \/\u003Eylabel('imag axis');    %Give the ylabel\u003Cbr \/\u003Etitle('Example 1');     %Give the title of the plot\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Cbr \/\u003Eavi = moviein((8*pi+pi\/2)*5);\u003Cbr \/\u003E\u003Cbr \/\u003E%Animation\u003Cbr \/\u003Efigure(3)\u003Cbr \/\u003E\u003Cbr \/\u003Ei=0;\u003Cbr \/\u003E\u003Cbr \/\u003Ex = [];\u003Cbr \/\u003Ey = [];\u003Cbr \/\u003E\u003Cbr \/\u003Efor t=0:0.1:8*pi+pi\/2+pi;\u003Cbr \/\u003E\u003Cbr \/\u003E    i = i + 1;\u003Cbr \/\u003E\u003Cbr \/\u003E    node_0_x = crank_x + crank_r*cos(t);\u003Cbr \/\u003E    node_0_y = crank_y + crank_r*sin(t);\u003Cbr \/\u003E\u003Cbr \/\u003E    \u003Cbr \/\u003E    %\u003Cbr \/\u003E    % NODE 1\u003Cbr \/\u003E    %\u003Cbr \/\u003E\u003Cbr \/\u003E    dist = 10000000;\u003Cbr \/\u003E    \u003Cbr \/\u003E    for link_9_t=0:0.02:pi;\u003Cbr \/\u003E        node_1_x = pin_x + link_9*cos(link_9_t);\u003Cbr \/\u003E        node_1_y = pin_y + link_9*sin(link_9_t);\u003Cbr \/\u003E\u003Cbr \/\u003E        dist_tmp = sqrt((node_0_x-node_1_x)^2+(node_0_y-node_1_y)^2);\u003Cbr \/\u003E\u003Cbr \/\u003E        diff = abs(dist_tmp - link_1);\u003Cbr \/\u003E\u003Cbr \/\u003E        if (diff \u003C dist)\u003Cbr \/\u003E            dist = diff;\u003Cbr \/\u003E            theta = link_9_t;\u003Cbr \/\u003E            %fprintf('New theta: %d  Diff: %d\\n', theta, diff);\u003Cbr \/\u003E        end\u003Cbr \/\u003E    end\u003Cbr \/\u003E    \u003Cbr \/\u003E    link_9_t = theta;\u003Cbr \/\u003E    \u003Cbr \/\u003E    node_1_x = pin_x + link_9*cos(link_9_t);\u003Cbr \/\u003E    node_1_y = pin_y + link_9*sin(link_9_t);\u003Cbr \/\u003E    \u003Cbr \/\u003E    \u003Cbr \/\u003E    %\u003Cbr \/\u003E    % NODE 2\u003Cbr \/\u003E    %\u003Cbr \/\u003E    \u003Cbr \/\u003E    dist = 10000000;\u003Cbr \/\u003E    \u003Cbr \/\u003E    for link_10_t=.75*pi:0.02:1.5*pi;\u003Cbr \/\u003E        node_2_x = pin_x + link_10*cos(link_10_t);\u003Cbr \/\u003E        node_2_y = pin_y + link_10*sin(link_10_t);\u003Cbr \/\u003E    \u003Cbr \/\u003E        dist_tmp = sqrt((node_2_x-node_1_x)^2+(node_2_y-node_1_y)^2);\u003Cbr \/\u003E        \u003Cbr \/\u003E        diff = abs(dist_tmp - link_2);\u003Cbr \/\u003E        \u003Cbr \/\u003E        if (diff \u003C dist)\u003Cbr \/\u003E            dist = diff;\u003Cbr \/\u003E            theta = link_10_t;\u003Cbr \/\u003E            %fprintf('New theta: %d  Diff: %d\\n', theta, diff);\u003Cbr \/\u003E        end\u003Cbr \/\u003E    end\u003Cbr \/\u003E    \u003Cbr \/\u003E    link_10_t = theta;\u003Cbr \/\u003E    \u003Cbr \/\u003E    node_2_x = pin_x + link_10*cos(link_10_t);\u003Cbr \/\u003E    node_2_y = pin_y + link_10*sin(link_10_t);\u003Cbr \/\u003E    \u003Cbr \/\u003E    %\u003Cbr \/\u003E    % NODE 3\u003Cbr \/\u003E    %\u003Cbr \/\u003E    \u003Cbr \/\u003E     dist = 10000000;\u003Cbr \/\u003E    \u003Cbr \/\u003E    for link_8_t=pi:0.02:2*pi;\u003Cbr \/\u003E        node_3_x = pin_x + link_8*cos(link_8_t);\u003Cbr \/\u003E        node_3_y = pin_y + link_8*sin(link_8_t);\u003Cbr \/\u003E    \u003Cbr \/\u003E        dist_tmp = sqrt((node_0_x-node_3_x)^2+(node_0_y-node_3_y)^2);\u003Cbr \/\u003E        \u003Cbr \/\u003E        diff = abs(dist_tmp - link_6);\u003Cbr \/\u003E        \u003Cbr \/\u003E        if (diff \u003C dist)\u003Cbr \/\u003E            dist = diff;\u003Cbr \/\u003E            theta = link_8_t;\u003Cbr \/\u003E        end\u003Cbr \/\u003E    end\u003Cbr \/\u003E    \u003Cbr \/\u003E    link_8_t = theta;\u003Cbr \/\u003E    \u003Cbr \/\u003E    node_3_x = pin_x + link_8*cos(link_8_t);\u003Cbr \/\u003E    node_3_y = pin_y + link_8*sin(link_8_t);\u003Cbr \/\u003E    \u003Cbr \/\u003E    %\u003Cbr \/\u003E    % NODE 4\u003Cbr \/\u003E    %\u003Cbr \/\u003E    \u003Cbr \/\u003E    dist = 10000000;\u003Cbr \/\u003E    \u003Cbr \/\u003E    for link_7_t=.75*pi:0.02:1.5*pi;\u003Cbr \/\u003E        node_4_x = node_3_x + link_7*cos(link_7_t);\u003Cbr \/\u003E        node_4_y = node_3_y + link_7*sin(link_7_t);\u003Cbr \/\u003E    \u003Cbr \/\u003E        dist_tmp = sqrt((node_4_x-node_2_x)^2+(node_4_y-node_2_y)^2);\u003Cbr \/\u003E        \u003Cbr \/\u003E        diff = abs(dist_tmp - link_3);\u003Cbr \/\u003E        \u003Cbr \/\u003E        if (diff \u003C dist)\u003Cbr \/\u003E            dist = diff;\u003Cbr \/\u003E            theta = link_7_t;\u003Cbr \/\u003E        end\u003Cbr \/\u003E    end\u003Cbr \/\u003E    \u003Cbr \/\u003E    link_7_t = theta;\u003Cbr \/\u003E    \u003Cbr \/\u003E    node_4_x = node_3_x + link_7*cos(link_7_t);\u003Cbr \/\u003E    node_4_y = node_3_y + link_7*sin(link_7_t);\u003Cbr \/\u003E    \u003Cbr \/\u003E    \u003Cbr \/\u003E    %\u003Cbr \/\u003E    % NODE 5\u003Cbr \/\u003E    %\u003Cbr \/\u003E    \u003Cbr \/\u003E    dist = 10000000;\u003Cbr \/\u003E    \u003Cbr \/\u003E    for link_5_t=pi:0.02:2*pi;\u003Cbr \/\u003E        node_5_x = node_3_x + link_5*cos(link_5_t);\u003Cbr \/\u003E        node_5_y = node_3_y + link_5*sin(link_5_t);\u003Cbr \/\u003E    \u003Cbr \/\u003E        dist_tmp = sqrt((node_4_x-node_5_x)^2+(node_4_y-node_5_y)^2);\u003Cbr \/\u003E       \u003Cbr \/\u003E        diff = abs(dist_tmp - link_4);\u003Cbr \/\u003E      \u003Cbr \/\u003E        if (diff \u003C dist)\u003Cbr \/\u003E            dist = diff;\u003Cbr \/\u003E            theta = link_5_t;\u003Cbr \/\u003E            %fprintf('New theta: %d  Diff: %d\\n', theta, diff);\u003Cbr \/\u003E        end\u003Cbr \/\u003E    end\u003Cbr \/\u003E\u003Cbr \/\u003E    link_5_t = theta;\u003Cbr \/\u003E\u003Cbr \/\u003E    node_5_x = node_3_x + link_5*cos(link_5_t);\u003Cbr \/\u003E    node_5_y = node_3_y + link_5*sin(link_5_t);\u003Cbr \/\u003E\u003Cbr \/\u003E    node_6_x = node_3_x + link_11*cos(link_5_t);\u003Cbr \/\u003E    node_6_y = node_3_y + link_11*sin(link_5_t);\u003Cbr \/\u003E\u003Cbr \/\u003E    x(end+1) = node_6_x;\u003Cbr \/\u003E    y(end+1) = node_6_y;\u003Cbr \/\u003E\u003Cbr \/\u003E    %\u003Cbr \/\u003E    % DRAW\u003Cbr \/\u003E    %\u003Cbr \/\u003E\u003Cbr \/\u003E    plot([crank_x pin_x], [crank_y pin_y],'black','linewidth',4); hold on       % crank to pin\u003Cbr \/\u003E    plot([crank_x node_0_x], [crank_y node_0_y],'r','linewidth',4); hold on     % crank\u003Cbr \/\u003E\u003Cbr \/\u003E    plot([node_0_x node_1_x], [node_0_y node_1_y],'b','linewidth',4);           % link_1\u003Cbr \/\u003E    plot([pin_x node_1_x], [pin_y node_1_y],'g','linewidth',4);                 % link_9\u003Cbr \/\u003E\u003Cbr \/\u003E    plot([pin_x node_2_x], [pin_y node_2_y],'g','linewidth', 4);                % link_10\u003Cbr \/\u003E    plot([node_1_x node_2_x], [node_1_y node_2_y],'g','linewidth', 4);          % link_2\u003Cbr \/\u003E\u003Cbr \/\u003E    plot([node_0_x node_3_x], [node_0_y node_3_y],'b','linewidth',4);           % link_6\u003Cbr \/\u003E    plot([pin_x node_3_x], [pin_y node_3_y],'r','linewidth',4);                 % link_8\u003Cbr \/\u003E\u003Cbr \/\u003E    plot([node_3_x node_4_x], [node_3_y node_4_y],'g','linewidth', 4);          % link_7\u003Cbr \/\u003E    plot([node_2_x node_4_x], [node_2_y node_4_y],'r','linewidth', 4);          % link_3\u003Cbr \/\u003E\u003Cbr \/\u003E    plot([node_3_x node_5_x], [node_3_y node_5_y],'r','linewidth', 4);          % link_5\u003Cbr \/\u003E    plot([node_4_x node_5_x], [node_4_y node_5_y],'b','linewidth', 4);          % link_4\u003Cbr \/\u003E\u003Cbr \/\u003E    plot([node_3_x node_6_x], [node_3_y node_6_y],'b','linewidth', 4);          % link_5\u003Cbr \/\u003E\u003Cbr \/\u003E    plot(x,y);\u003Cbr \/\u003E\u003Cbr \/\u003E    hold off            %So next plot will erase the current plot\u003Cbr \/\u003E    axis([-900 600 -900 600]);\u003Cbr \/\u003E    %pause(0.001)          %Stop execution for 0.1 sec so that the animation can be seen\u003Cbr \/\u003E    avi(i) = getframe(gca);\u003Cbr \/\u003Eend\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Cbr \/\u003Emovie2avi(avi,'jansen.avi','compression','cinepak') % or cinepak, indeo5\u003Cbr \/\u003E\u003C\/pre\u003E \u003Cscript type=\"text\/javascript\"\u003E\/\/ code snippet is loaded here, use SH3 API to highlight it var element = document.getElementById('sh3-123'); SyntaxHighlighter.highlight(undefined, element); \u003C\/script\u003E"},"link":[{"rel":"replies","type":"application/atom+xml","href":"http:\/\/bear24rw.blogspot.com\/feeds\/8523842852936678304\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/2010\/08\/theo-jansen-matlab-simulation.html#comment-form","title":"1 Comments"},{"rel":"edit","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default\/8523842852936678304"},{"rel":"self","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default\/8523842852936678304"},{"rel":"alternate","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/2010\/08\/theo-jansen-matlab-simulation.html","title":"Theo Jansen Matlab Simulation"}],"author":[{"name":{"$t":"Max Thrun"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/18216963066514872707"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"http:\/\/img1.blogblog.com\/img\/b16-rounded.gif"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"http:\/\/farm5.static.flickr.com\/4073\/4884166878_93557a0472_t.jpg","height":"72","width":"72"},"thr$total":{"$t":"1"}},{"id":{"$t":"tag:blogger.com,1999:blog-3623515592551780770.post-4307225699202729138"},"published":{"$t":"2009-11-14T16:48:00.024-05:00"},"updated":{"$t":"2010-08-11T22:47:03.370-04:00"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"hack"},{"scheme":"http://www.blogger.com/atom/ns#","term":"hacking"},{"scheme":"http://www.blogger.com/atom/ns#","term":"man in the middle"},{"scheme":"http://www.blogger.com/atom/ns#","term":"omegle"},{"scheme":"http://www.blogger.com/atom/ns#","term":"python"},{"scheme":"http://www.blogger.com/atom/ns#","term":"security"}],"title":{"type":"text","$t":"Omegle.com Man In The Middle Attack"},"content":{"type":"html","$t":"The other day my friend showed me this site \u003Ca href=\"http:\/\/omegle.com\"\u003EOmegle\u003C\/a\u003E. It's a pretty cool site that anonymously pairs you up with a 'stranger' and you chat 1 on 1 with the ability to disconnect and find a new 'stranger' at any time. It's surprisingly addicting and fun. It claims to be completely anonymous and so to check this I decided to fire up \u003Ca href=\"http:\/\/www.wireshark.org\/\"\u003EWireshark\u003C\/a\u003E and take a look at what information was getting passed to the server. I was surprised to find the method of communication extremely simple and completely unencrypted. When you connect to a person the process looks like this:\u003Cbr \/\u003E\u003Ccode\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-weight:bold;\"\u003EYou:\u003C\/span\u003E POST omegle.com\/start\u003Cbr \/\u003E\u003Cspan style=\"font-weight:bold;\"\u003EOmg:\u003C\/span\u003E HTTP \"123456\"             \u003Cspan style=\"font-weight:bold;\"\u003E\u003C-- random 6 digit 'username' (a-z A-Z 0-9 _ -)\u003C\/span\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-weight:bold;\"\u003EYou:\u003C\/span\u003E POST omegle.com\/events?id=123456\u003Cbr \/\u003E\u003Cspan style=\"font-weight:bold;\"\u003EOmg:\u003C\/span\u003E HTTP [[\"connected\"]]\u003Cbr \/\u003E\u003Cspan style=\"font-weight:bold;\"\u003EYou:\u003C\/span\u003E POST omegle.com\/send?msg=hello\u0026id=123456\u003Cbr \/\u003E\u003Cspan style=\"font-weight:bold;\"\u003EOmg:\u003C\/span\u003E HTTP win                  \u003Cspan style=\"font-weight:bold;\"\u003E\u003C-- funny\u003C\/span\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-weight:bold;\"\u003EYou:\u003C\/span\u003E POST omegle.com\/events?id=123456\u003Cbr \/\u003E\u003Cspan style=\"font-weight:bold;\"\u003EOmg:\u003C\/span\u003E HTTP [[\"gotMessage\", \"hey\"]]     \u003Cspan style=\"font-weight:bold;\"\u003E\u003C-- message from other person\u003C\/span\u003E\u003Cbr \/\u003E...\u003Cbr \/\u003E\u003Cspan style=\"font-weight:bold;\"\u003EYou:\u003C\/span\u003E POST omegle.com\/disconnect?id=123456 \u003Cspan style=\"font-weight:bold;\"\u003E\u003C-- quit the chat\u003C\/span\u003E\u003Cbr \/\u003E\u003C\/code\u003E\u003Cbr \/\u003E\u003Cbr \/\u003ESeeing this immediately sparked some thought. Can I request events for other users? Can I send messages to other users? Can I disconnect other users? It seemed all you needed to do was post the command with the user id you wanted to receive events for. As it turns out its almost even better. If you post for events using someone elses user id it will \"implode\" their chat:\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/4103478151\/\" title=\"Screenshot by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm3.static.flickr.com\/2491\/4103478151_554efd56bd_o.png\" width=\"466\" height=\"62\" alt=\"Screenshot\" \/\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EWhats better is that the other person is still connected and they have no idea that their 'stranger' has been imploded. Now you can keep talking to the other person and they have no idea what just happened.\u003Cbr \/\u003E\u003Cbr \/\u003EThere is one major problem with this however. According to:\u003Cbr \/\u003E\u003Cbr \/\u003Ehttp:\/\/omegle.com\/count\u003Cbr \/\u003E\u003Cbr \/\u003Ethere are on average only about 3k users online at a given time, but the number of possible user ids are\u003Cbr \/\u003E\u003Cbr \/\u003E(26+26+10+1+1)^6 = 68,719,476,736\u003Cbr \/\u003E\u003Cbr \/\u003EThat is a terrible chance of you finding someone quickly. I actually started making a brute forcer (omegle_brute_force.py) but quickly realized that this was an ill fated attempted.\u003Cbr \/\u003E\u003Cbr \/\u003ESo if you cant find the users, why not have the users come to you? I realized that Omegle would be prime for a classic \u003Ca href=\"http:\/\/en.wikipedia.org\/wiki\/Man-in-the-middle_attack\"\u003Eman in the middle attack\u003C\/a\u003E. The idea is super simple. I would connect to two strangers just like normal, but instead of me talking to them they would talk to each other \u003Cspan style=\"font-weight:bold;\"\u003Ethrough\u003C\/span\u003E me. As long as I don't inject any messages or anything weird they should have no idea that I'm even there. Here is how the program looks:\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/4103393791\/\" title=\"omegle by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm3.static.flickr.com\/2625\/4103393791_c83703f5fe.jpg\" width=\"430\" height=\"336\" alt=\"omegle\" \/\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EAs you can see I am having a legit connection to both client 1 and client 2, but I am transparently passing their messages right through me to the other person.\u003Cbr \/\u003E\u003Cbr \/\u003EDoing this was kinda tricky. Whenever you POST for events it blocks until the read is fulfilled. This means that with a single threaded program each person would have to take turns talking since the program would block every time I polled for their messages. Even most two threaded setups have the same problem. The solution I came up with I feel works pretty well. There are four total threads:\u003Cbr \/\u003E\u003Cbr \/\u003E1) Sending to client 1\u003Cbr \/\u003E2) Receiving from client 1\u003Cbr \/\u003E3) Sending to client 2\u003Cbr \/\u003E4) Receiving from client 2\u003Cbr \/\u003E\u003Cbr \/\u003EEvery time the receive thread gets a message it queues it into a stack, so that the sending thread can retrieve the message at its leisure. The result? It doesn't matter if a POST blocks because the sender thread can still work through the queue and the other threads can still send and receive messages.\u003Cbr \/\u003E\u003Cbr \/\u003EA classic man in the middle attack:\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/4104149908\/\" title=\"Screenshot-2 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm3.static.flickr.com\/2527\/4104149908_cedf54478d.jpg\" width=\"500\" height=\"420\" alt=\"Screenshot-2\" \/\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr \/\u003EThis has some interesting possibilities. I can send messages to one of the clients at the others behalf and the person will have no idea that I sent it. Also what about connecting more then 2 people together? There is no reason I couldn't connect multiple people together in a chat and maybe even append a user tag to each of their messages.\u003Cbr \/\u003E\u003Cbr \/\u003EOmegle is a pretty interesting site, and you gotta hand it to \u003Ca href=\"http:\/\/omegler.blogspot.com\/\"\u003ELeif K-Brooks\u003C\/a\u003E for (apparently) single handedly making such a propular site at only 18. I hope that he can implement some needed security to Omegle to prevent this kind of attack in the future.\u003Cbr \/\u003E\u003Cbr \/\u003EDownload my programs \u003Cspan style=\"font-weight:bold;\"\u003E\u003Ca href=\"http:\/\/ucfilespace.uc.edu\/~thrunml\/omegle.zip\"\u003Ehere\u003C\/a\u003E [\u003Ca href=\"http:\/\/bear24rw.gotdns.com:40\/omegle.zip\"\u003Emirror\u003C\/a\u003E]\u003C\/span\u003E.\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Cspan style=\"font-weight:bold;\"\u003Eomegle_man_in_middle.py\u003C\/span\u003E - program described above\u003Cbr \/\u003E\u003Cspan style=\"font-weight:bold;\"\u003Eomegle_brute_force.py\u003C\/span\u003E  - attempts to guess user ids and post for events\u003Cbr \/\u003E\u003Cspan style=\"font-weight:bold;\"\u003Eomegle_class.py\u003C\/span\u003E        - generic class for interacting with omegle\u003Cbr \/\u003E\u003Cspan style=\"font-weight:bold;\"\u003Eomegle_connect_view.py\u003C\/span\u003E - connect to omegle and posts for events\u003Cbr \/\u003E\u003Cspan style=\"font-weight:bold;\"\u003Eomegle_multi_connect.py\u003C\/span\u003E - connects to multiple people at once. proof of concept that multi connections can be made\u003Cbr \/\u003E\u003Cspan style=\"font-weight:bold;\"\u003Eomegle_send.py\u003C\/span\u003E         - send messages using a user id\u003Cbr \/\u003E\u003Cbr \/\u003EEDIT:\u003Cbr \/\u003E\u003Cbr \/\u003EFound another omegle man in the middle attack written in perl [\u003Ca href=\"http:\/\/thinkwaitfast.blogspot.com\/2009\/09\/i-should-really-get-job-soon.html\"\u003Ehere\u003C\/a\u003E]"},"link":[{"rel":"replies","type":"application/atom+xml","href":"http:\/\/bear24rw.blogspot.com\/feeds\/4307225699202729138\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/2009\/11\/omeglecom-man-in-middle-attack.html#comment-form","title":"17 Comments"},{"rel":"edit","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default\/4307225699202729138"},{"rel":"self","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default\/4307225699202729138"},{"rel":"alternate","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/2009\/11\/omeglecom-man-in-middle-attack.html","title":"Omegle.com Man In The Middle Attack"}],"author":[{"name":{"$t":"Max Thrun"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/18216963066514872707"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"http:\/\/img1.blogblog.com\/img\/b16-rounded.gif"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"http:\/\/farm3.static.flickr.com\/2625\/4103393791_c83703f5fe_t.jpg","height":"72","width":"72"},"thr$total":{"$t":"17"}},{"id":{"$t":"tag:blogger.com,1999:blog-3623515592551780770.post-249059568814771117"},"published":{"$t":"2009-11-08T17:54:00.046-05:00"},"updated":{"$t":"2013-03-26T21:55:49.444-04:00"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"driver"},{"scheme":"http://www.blogger.com/atom/ns#","term":"eye"},{"scheme":"http://www.blogger.com/atom/ns#","term":"gspca"},{"scheme":"http://www.blogger.com/atom/ns#","term":"karmic"},{"scheme":"http://www.blogger.com/atom/ns#","term":"linux"},{"scheme":"http://www.blogger.com/atom/ns#","term":"ov534"},{"scheme":"http://www.blogger.com/atom/ns#","term":"patch"},{"scheme":"http://www.blogger.com/atom/ns#","term":"playstation"},{"scheme":"http://www.blogger.com/atom/ns#","term":"ps3"},{"scheme":"http://www.blogger.com/atom/ns#","term":"ubuntu"}],"title":{"type":"text","$t":"PS3 Eye Driver Patch"},"content":{"type":"html","$t":"\u003Cspan style=\"font-weight:bold;\"\u003EUpdate:\u003C\/span\u003E A lot has happened since this was posted. The main line kernel now includes most of these fixes! \u003Cbr \/\u003E\u003Cbr \/\u003EI've had a \u003Ca href=\"http:\/\/en.wikipedia.org\/wiki\/PlayStation_Eye\"\u003EPS3 Eye\u003C\/a\u003E lying around for a while but I hadn't gotten around to using it because when it first came out there were no drivers for it so it sat in my closet for almost a year. I decided to check out the current state of the PS3 Eye in Linux and was happy to find that there is now support in the 2.6.31 kernel.  \u003Cbr \/\u003E\u003Cbr \/\u003EWhat I was disappointed to find out though was that there was no ability to select frame rate or control a lot of the image quality. Lucky there is \u003Ca href=\"http:\/\/kaswy.free.fr\/?q=en\/node\/54\"\u003Epatch\u003C\/a\u003E that allows selection of frames rates all the way up to 125 fps and some image quality controls. I patched my driver and tried it out but found that the color of the image was way off and none of the given controls could fix this.  \u003Cbr \/\u003E\u003Cbr \/\u003EI decided to do some research and add support for brightness, contrast, hue, and auto white balance. \u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/4086925303\/\" title=\"before by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm3.static.flickr.com\/2592\/4086925303_8104630ae6.jpg\" width=\"500\" height=\"230\" alt=\"before\" \/\u003E\u003C\/a\u003E\u003Cbr\u003E\u003Ci\u003EWith Kaswy's Patch\u003C\/i\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/4087682316\/\" title=\"driver by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm3.static.flickr.com\/2713\/4087682316_2eb1f2237d.jpg\" width=\"500\" height=\"213\" alt=\"driver\" \/\u003E\u003C\/a\u003E\u003Cbr\u003E\u003Ci\u003EWith my patch\u003C\/i\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EI'm going to just supply the whole .c file instead of a patch since they are almost the same size. Applying the patch is almost the same as Kaswy's \u003Cbr \/\u003E\u003Cbr \/\u003ETo apply: \u003Cbr \/\u003E\u003Cbr \/\u003EInstall necessary packages: \u003Cbr \/\u003E\u003Cpre class=\"brush: text; toolbar: false; gutter: false;\"\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E$ sudo apt-get install kernel-package libncurses5-dev wget bzip2 build-essential linux-source\u003C\/pre\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EExtract kernel source code: \u003Cbr \/\u003E\u003Cpre class=\"brush: text; toolbar: false; gutter: false;\"\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E$ sudo su\u003Cbr \/\u003E\u003Cbr \/\u003E$ cd \/usr\/src\u003Cbr \/\u003E\u003Cbr \/\u003E$ tar --bzip2 -xvf linux-source-2.6.(your version).tar.bz2\u003Cbr \/\u003E\u003Cbr \/\u003E$ ln -s linux-source-2.6.(your version) linux\u003Cbr \/\u003E\u003Cbr \/\u003E\u003C\/pre\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EReplace driver: \u003Cbr \/\u003E\u003Cpre class=\"brush: text; toolbar: false; gutter: false;\"\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E$ cd linux\u003Cbr \/\u003E\u003Cbr \/\u003E$ wget ucfilespace.uc.edu\/~thrunml\/ov534.c\u003Cbr \/\u003E\u003Cbr \/\u003E$ rm drivers\/media\/video\/gspca\/ov534.c\u003Cbr \/\u003E\u003Cbr \/\u003E$ mv ov534.c drivers\/media\/video\/gspca\/\u003Cbr \/\u003E\u003Cbr \/\u003E\u003C\/pre\u003E\u003Cbr \/\u003E\u003Cbr \/\u003ERecompile driver: \u003Cbr \/\u003E\u003Cpre class=\"brush: text; toolbar: false; gutter: false;\"\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E$ cp \/usr\/src\/linux-headers-$(uname -r)\/Module.symvers \/usr\/src\/linux\u003Cbr \/\u003E\u003Cbr \/\u003E$ make oldconfig\u003Cbr \/\u003E\u003Cbr \/\u003E$ make modules_prepare\u003Cbr \/\u003E\u003Cbr \/\u003E$ make SUBDIRS=drivers\/media\/video\/gspca modules\u003Cbr \/\u003E\u003Cbr \/\u003E\u003C\/pre\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EInstall new driver: \u003Cbr \/\u003E\u003Cpre class=\"brush: text; toolbar: false; gutter: false;\"\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E$ cp drivers\/media\/video\/gspca\/gspca_ov534.ko \/lib\/modules\/$(uname -r)\/kernel\/drivers\/media\/video\/gspca\u003Cbr \/\u003E\u003Cbr \/\u003E$ depmod\u003Cbr \/\u003E\u003Cbr \/\u003E\u003C\/pre\u003E\u003Cbr \/\u003E\u003Cbr \/\u003ECheck to make sure it installed: \u003Cbr \/\u003E\u003Cpre class=\"brush: text; toolbar: false; gutter: false;\"\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E$ modinfo gspca-ov534\u003Cbr \/\u003E\u003Cbr \/\u003Efilename:       \/lib\/modules\/2.6.31-14-generic\/kernel\/drivers\/media\/video\/gspca\/gspca_ov534.ko\u003Cbr \/\u003E\u003Cbr \/\u003Elicense:        GPL\u003Cbr \/\u003E\u003Cbr \/\u003Edescription:    GSPCA\/OV534 USB Camera Driver(kaswy mod for MT use V0.5 \/ \u003Cb\u003Ebear24rw patch V0.1\u003C\/b\u003E)\u003Cbr \/\u003E\u003Cbr \/\u003Eauthor:         Antonio Ospite \u003Cospite@studenti.unina.it\u003E\u003Cbr \/\u003E\u003Cbr \/\u003Esrcversion:     1F87820D2B0705822B61A16\u003Cbr \/\u003E\u003Cbr \/\u003Ealias:          usb:v1415p2000d*dc*dsc*dp*ic*isc*ip*\u003Cbr \/\u003E\u003Cbr \/\u003Edepends:        gspca_main\u003Cbr \/\u003E\u003Cbr \/\u003Evermagic:       2.6.31.4 SMP mod_unload modversions \u003Cbr \/\u003E\u003Cbr \/\u003Eparm:           videomode: = xx \/\/Set the videomode(see doc) (int)\u003Cbr \/\u003E\u003Cbr \/\u003Eparm:           autogain: = [0|1] \/\/Autogain (agc,aec,awb) (bool)\u003Cbr \/\u003E\u003Cbr \/\u003Eparm:           gain: = [0..63] \/\/main gain (int)\u003Cbr \/\u003E\u003Cbr \/\u003Eparm:           awb: = [0|1] \/\/Auto White Balance (bool)\u003Cbr \/\u003E\u003Cbr \/\u003Eparm:           exposure: = [0..255] \/\/Exposure (int)\u003Cbr \/\u003E\u003Cbr \/\u003Eparm:           brightness: = [0..255] \/\/Brightness (int)\u003Cbr \/\u003E\u003Cbr \/\u003Eparm:           contrast: = [0..255] \/\/Contrast (int)\u003Cbr \/\u003E\u003Cbr \/\u003Eparm:           redblc: = [0..255] \/\/Red Balance (int)\u003Cbr \/\u003E\u003Cbr \/\u003Eparm:           blueblc: = [0..255] \/\/Blue Balance (int)\u003Cbr \/\u003E\u003Cbr \/\u003Eparm:           hue: = [0..255] \/\/Hue (int)\u003Cbr \/\u003E\u003Cbr \/\u003Eparm:           sharpness: = [0..63] \/\/Sharpness (int)\u003Cbr \/\u003E\u003Cbr \/\u003Eparm:           vflip: = [0|1] \/\/Vertical flip (bool)\u003Cbr \/\u003E\u003Cbr \/\u003Eparm:           hflip: = [0|1] \/\/Horizontal mirror (bool)\u003Cbr \/\u003E\u003Cbr \/\u003E\u003C\/pre\u003E\u003Cbr \/\u003E\u003Cbr \/\u003ENow we can remove the one currently in use and load our new one: \u003Cbr \/\u003E\u003Cpre class=\"brush: text; toolbar: false; gutter: false;\"\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E$ modprobe -r gspca-ov534\u003Cbr \/\u003E\u003Cbr \/\u003E$ modprobe gspca-ov534 videomode=10\u003Cbr \/\u003E\u003Cbr \/\u003E\u003C\/pre\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EThe available video modes are: \u003Cbr \/\u003E\u003Cpre class=\"brush: text; toolbar: false; gutter: false;\"\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E00: 640x480@15\u003Cbr \/\u003E\u003Cbr \/\u003E01: 640x480@30\u003Cbr \/\u003E\u003Cbr \/\u003E02: 640x480@40\u003Cbr \/\u003E\u003Cbr \/\u003E03: 640x480@50\u003Cbr \/\u003E\u003Cbr \/\u003E04: 640x480@60\u003Cbr \/\u003E\u003Cbr \/\u003E10: 320x240@30\u003Cbr \/\u003E\u003Cbr \/\u003E11: 320x240@40\u003Cbr \/\u003E\u003Cbr \/\u003E12: 320x240@50\u003Cbr \/\u003E\u003Cbr \/\u003E13: 320x240@60\u003Cbr \/\u003E\u003Cbr \/\u003E14: 320x240@75\u003Cbr \/\u003E\u003Cbr \/\u003E15: 320x240@100\u003Cbr \/\u003E\u003Cbr \/\u003E16: 320x240@125\u003Cbr \/\u003E\u003Cbr \/\u003E\u003C\/pre\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EYou can adjust the image using guvcview \u003Cbr \/\u003E\u003Cpre class=\"brush: text; toolbar: false; gutter: false;\"\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E$ sudo apt-get install guvcview\u003Cbr \/\u003E\u003Cbr \/\u003E$ guvcview\u003Cbr \/\u003E\u003Cbr \/\u003E\u003C\/pre\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EHopefully the main line driver gets patched soon with these enhancements."},"link":[{"rel":"replies","type":"application/atom+xml","href":"http:\/\/bear24rw.blogspot.com\/feeds\/249059568814771117\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/2009\/11\/ps3-eye-driver-patch.html#comment-form","title":"111 Comments"},{"rel":"edit","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default\/249059568814771117"},{"rel":"self","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default\/249059568814771117"},{"rel":"alternate","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/2009\/11\/ps3-eye-driver-patch.html","title":"PS3 Eye Driver Patch"}],"author":[{"name":{"$t":"Max Thrun"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/18216963066514872707"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"http:\/\/img1.blogblog.com\/img\/b16-rounded.gif"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"http:\/\/farm3.static.flickr.com\/2592\/4086925303_8104630ae6_t.jpg","height":"72","width":"72"},"thr$total":{"$t":"111"}},{"id":{"$t":"tag:blogger.com,1999:blog-3623515592551780770.post-3928132441856256669"},"published":{"$t":"2009-10-01T12:36:00.034-04:00"},"updated":{"$t":"2010-08-11T23:32:49.971-04:00"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"atmega"},{"scheme":"http://www.blogger.com/atom/ns#","term":"board"},{"scheme":"http://www.blogger.com/atom/ns#","term":"darlington"},{"scheme":"http://www.blogger.com/atom/ns#","term":"display"},{"scheme":"http://www.blogger.com/atom/ns#","term":"eagle"},{"scheme":"http://www.blogger.com/atom/ns#","term":"etching"},{"scheme":"http://www.blogger.com/atom/ns#","term":"john"},{"scheme":"http://www.blogger.com/atom/ns#","term":"layout"},{"scheme":"http://www.blogger.com/atom/ns#","term":"led"},{"scheme":"http://www.blogger.com/atom/ns#","term":"matrix"},{"scheme":"http://www.blogger.com/atom/ns#","term":"max"},{"scheme":"http://www.blogger.com/atom/ns#","term":"pcb"},{"scheme":"http://www.blogger.com/atom/ns#","term":"register"},{"scheme":"http://www.blogger.com/atom/ns#","term":"shift"},{"scheme":"http://www.blogger.com/atom/ns#","term":"thrun"},{"scheme":"http://www.blogger.com/atom/ns#","term":"wathen"}],"title":{"type":"text","$t":"LED Matrix"},"content":{"type":"html","$t":"Last year in one of my classes we were required to make an 'artefact' or something that reflects the interests of the class. Most people make posters and the past two quarters that's what my class did too. Posters however are static, usually boring, and don't reflect that fact that everyone in the class is an EE major. We decided posters are for noobs and decided to go off the wall a little and make an LED matrix display. Lucky one of my friends John Wathen already had this beautiful 16x24 Green SMD LED matrix that he built back in high school.\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3574348952\/\" title=\"P5271009 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3652\/3574348952_c85af6167f.jpg\" width=\"500\" height=\"375\" alt=\"P5271009\" \/\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3573544803\/\" title=\"P5271014 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm3.static.flickr.com\/2452\/3573544803_03000843fc.jpg\" width=\"500\" height=\"375\" alt=\"P5271014\" \/\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr \/\u003EWhat we didn't have however was a driver for it. The driver we choose to design was highly inspired from \u003Ca href=\"http:\/\/www.instructables.com\/id\/LED-matrix-using-shift-registers\/\"\u003Ethis one\u003C\/a\u003E. The basic idea is that you use shift registers to sink the columns and a line driver of some sort to source the rows (we chose to use a \u003Ca href=\"http:\/\/en.wikipedia.org\/wiki\/Darlington_transistor\"\u003EDarlington array\u003C\/a\u003E). \u003Cbr \/\u003E\u003Cbr \/\u003EThere where a lot of changes from the Instructables design that that we had to make however. The matrix in the Instructables was a lot smaller than ours and used 8 IO lines to drive each row. Since our matrix has 16 rows this was completely infeasible using just an \u003Ca href=\"http:\/\/www.atmel.com\/dyn\/products\/Product_card.asp?part_id=3303\"\u003EATMega168\u003C\/a\u003E. To solve this issue we choose to use a 4:16 \u003Ca href=\"http:\/\/en.wikipedia.org\/wiki\/Multiplexer\"\u003Ede-mux\u003C\/a\u003E to control all sixteen rows with only 4 IO pins. The de-mux combined with two 8 channel Darlington arrays provided the perfect interface to control all 16 rows. To sink the columns we choose to string three 8 Output \u003Ca href=\"http:\/\/en.wikipedia.org\/wiki\/Shift_register\"\u003Eshift registers\u003C\/a\u003E. Each shift register is rated to handle the current of the 8 LEDs that could possibly be on at one time.\u003Cbr \/\u003E\u003Cbr \/\u003ESome other features that we included on the driver board were 3 green LEDs, 3 push buttons, ISP header, TTL header. When all was said and done we ended up the the schematic shown below.\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3574373426\/\" title=\"rev_4 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm3.static.flickr.com\/2447\/3574373426_503851b4e9.jpg\" width=\"500\" height=\"256\" alt=\"rev_4\" \/\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EI know, you are probably looking at that and thinking, \"Why are all the shift register outputs criss-crossed??\". The reason for doing this is because the output pins on the chip are not exactly in a row so to assist in board layout the pins had to be crossed and mixed up so that the board layout would be nice. It's much easier to change the order of the columns in the program then it is on the board layout (in my opinion). We didn't want to etch a double sided board so a lot of effort went into laying as much of the circuit out on a single side. There were a few paths that could not be routed and were just jumped with wire (you'll see in picture below).\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3971619171\/\" title=\"board by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3528\/3971619171_aefd2ebefe.jpg\" width=\"500\" height=\"404\" alt=\"board\" \/\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Cbr \/\u003ENotice how there are a bunch of air-wires (yellow lines) that I couldn't figure out how to route, they are manually jumped when the board is put together.\u003Cbr \/\u003E\u003Cbr \/\u003ETo etch the board we printed out the board layout 1:1 scale on glossy photo paper, it was than ironed onto a piece of copper clad. The idea is that the toner will stick to the copper clad and when the board is dipped in acid the acid will eat away at everything but the traces, since they are coved by the toner. I'm definitely not an expert in this area so ask John Wathen more about the process, he is basically a pro.\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3575123202\/\" title=\"DSC_9192 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3321\/3575123202_5d0d4d3b7a.jpg\" width=\"500\" height=\"332\" alt=\"DSC_9192\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Ci\u003EEtching the board in acid\u003C\/i\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3575122950\/\" title=\"DSC_9193 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3354\/3575122950_15d5263874.jpg\" width=\"500\" height=\"332\" alt=\"DSC_9193\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Ci\u003EChecking to see if its ready to be scrubbed\u003C\/i\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3575123848\/\" title=\"DSC_9199 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3595\/3575123848_e3d2ddf01a.jpg\" width=\"500\" height=\"332\" alt=\"DSC_9199\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Ci\u003EDirty traces\u003C\/i\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3575124082\/\" title=\"DSC_9205 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm3.static.flickr.com\/2431\/3575124082_465d0bd566.jpg\" width=\"500\" height=\"332\" alt=\"DSC_9205\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Ci\u003EScrubbing off the rest of the toner\u003C\/i\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3575124516\/\" title=\"DSC_9217 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3624\/3575124516_a745213afb.jpg\" width=\"500\" height=\"332\" alt=\"DSC_9217\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Ci\u003EThe beautiful result, nice and shiny\u003C\/i\u003E\u003C\/center\u003E\u003Cbr \/\u003ENow, let me just tell you that we did this in a public bathroom at school. So there were three guys in a bathroom with latex gloves, a camera, and tub of some green liquid. Trust me we got some weird looks.\u003Cbr \/\u003E\u003Cbr \/\u003EThe next step was to drill all the holes. I don't remember exactly how many there were (John might) but there were a lot.\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3574352632\/\" title=\"IMAG0015 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3648\/3574352632_aba3c639f7.jpg\" width=\"500\" height=\"375\" alt=\"IMAG0015\" \/\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EAfter all the holes were drilled John soldered it all up.\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3574349530\/\" title=\"P5271010 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3559\/3574349530_efda24867a.jpg\" width=\"500\" height=\"375\" alt=\"P5271010\" \/\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3574349852\/\" title=\"P5271011 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3658\/3574349852_3a86d9270f.jpg\" width=\"500\" height=\"375\" alt=\"P5271011\" \/\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EAnd the result!\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3573545651\/\" title=\"P5271017 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3576\/3573545651_5a0196498d.jpg\" width=\"500\" height=\"375\" alt=\"P5271017\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3574351302\/\" title=\"P5271015 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3322\/3574351302_6a0e6b5ecf.jpg\" width=\"500\" height=\"375\" alt=\"P5271015\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3574350634\/\" title=\"P5271013 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm3.static.flickr.com\/2423\/3574350634_ac9f937a3c.jpg\" width=\"500\" height=\"375\" alt=\"P5271013\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3573542359\/\" title=\"P5271008 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3593\/3573542359_ea9cf699a6.jpg\" width=\"500\" height=\"375\" alt=\"P5271008\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3574347398\/\" title=\"P5271007 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3410\/3574347398_0e0d004da3.jpg\" width=\"500\" height=\"375\" alt=\"P5271007\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3573540181\/\" title=\"P5271004 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3600\/3573540181_d861a7ddfa.jpg\" width=\"500\" height=\"375\" alt=\"P5271004\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3573540987\/\" title=\"P5271005 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3344\/3573540987_a7371e6016.jpg\" width=\"375\" height=\"500\" alt=\"P5271005\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3573541779\/\" title=\"P5271006 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3564\/3573541779_4f6ea4c3b9.jpg\" width=\"375\" height=\"500\" alt=\"P5271006\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3573546271\/\" title=\"P5271019 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm3.static.flickr.com\/2465\/3573546271_f5ef0f8d60.jpg\" width=\"375\" height=\"500\" alt=\"P5271019\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3573544803\/\" title=\"P5271014 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm3.static.flickr.com\/2452\/3573544803_03000843fc.jpg\" width=\"500\" height=\"375\" alt=\"P5271014\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Cbr \/\u003ENow that the board was finished it was the moment of truth.\u003Cbr \/\u003E\u003Cbr \/\u003EAdam Steele lent me his programmer. Plugged it into my Xbuntu box, apt-get installed the avr tool-kit and the programmer was immediately recognized (NICE!). Flashed a simple program to flash the status LEDs and low and behold, IT WORKED! Next up, everything else. I started by modifying the program that the Intructables provided but quickly got frustrated by the way it worked. It treated each column as a bit in a byte and the rows as a byte, this made it extremely hard to visualize outputs to the display. Also I was using a de-mux and had 24 columns which the code did not easy support. So what do you do in this situation? REWRITE. \u003Cbr \/\u003E\u003Cbr \/\u003EAn outline of how the new code works:\u003Cbr \/\u003E\u003Cbr \/\u003EThe value for each pixel is stored in a 2D array 16x24, want to set the top left pixel? buffer[0][0] = 1; simple as that, much easier than dealing with it as an array of bytes. Okay, so it takes up more memory but IMO it is completely worth every bit (pun intended). \u003Cbr \/\u003E\u003Cbr \/\u003EThe code starts by initializing the ports (pull-ups, in\/out, etc) then it initializes timer1. To be completely honest the fill value for the timer was chosen by adjusting value, flashing, seeing if the refresh rate was noticeable. We ended up with OCR1A = 0x012C; as a good value.\u003Cbr \/\u003E\u003Cbr \/\u003EThe code then falls into an While(1) where it sequentially calls functions to draw stuff on the screen, for example:\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Cscript type=\"syntaxhighlighter\" class=\"brush: c\"\u003E\u003C![CDATA[\u003Cbr \/\u003ESpiral(5, 0);\u003Cbr \/\u003E\u003Cbr \/\u003ETunnel(1);\u003Cbr \/\u003ETunnel(0);\u003Cbr \/\u003ETunnel(1);\u003Cbr \/\u003E\u003Cbr \/\u003EErase_Rider(RIGHT, 10);\u003Cbr \/\u003EFill(LEFT, 10);\u003Cbr \/\u003E\u003Cbr \/\u003EShift(UP, 16, 50);\u003Cbr \/\u003E\u003Cbr \/\u003EErase_Rider(DOWN, 10);\u003Cbr \/\u003EErase_Rider(UP, 10);\u003Cbr \/\u003E]]\u003E\u003C\/script\u003E\u003Cbr \/\u003EAll the high level functions (tunnel, spiral, shift, etc..) write to 'buffer'. When the timer interrupt goes off it calls the function shift_int() which reorders the columns into 'buffer_2' and then shifts them out to the shift registers. It then calls shift_mux() which jumps to the next row. So essentially we have a double buffered display.\u003Cbr \/\u003E\u003Cbr \/\u003EOnce all the low level code was done it was all fun and games. It was really nice being at the point were all you had to work with is a 2D array. We ended up with the high level functions:\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Cscript type=\"syntaxhighlighter\" class=\"brush: c\"\u003E\u003C![CDATA[\u003Cbr \/\u003Evoid Delay_ms(int cnt)\u003Cbr \/\u003Evoid Clear_Display(void)\u003Cbr \/\u003Evoid Fill_Display(void)\u003Cbr \/\u003Evoid Flash_Display(u8 cycles, u8 speed)\u003Cbr \/\u003Evoid Col(u8 col, u8 state)\u003Cbr \/\u003Evoid Row(u8 row, u8 state)\u003Cbr \/\u003Evoid Fill_Col(u8 col, u8 dir, u8 speed, u8 state)\u003Cbr \/\u003Evoid Fill_Row(u8 row, u8 dir, u8 speed, u8 state)\u003Cbr \/\u003Evoid Fill(u8 dir, u8 speed)\u003Cbr \/\u003Evoid Invert_Col(u8 col)\u003Cbr \/\u003Evoid Invert_Row(u8 row)\u003Cbr \/\u003Evoid Invert_Fill(u8 dir, u8 speed) \u003Cbr \/\u003Evoid Erase_Rider(u8 dir, u8 speed)\u003Cbr \/\u003Evoid Spiral(u8 speed, u8 state)\u003Cbr \/\u003Evoid Tunnel(u8 state)\u003Cbr \/\u003Evoid Invert(u8 count, u8 speed)\u003Cbr \/\u003Evoid Draw_Line(u8 x1, u8 y1, u8 x2, u8 y2, u8 state)\u003Cbr \/\u003Evoid Shift(u8 dir, u8 amount, u8 speed)\u003Cbr \/\u003Evoid Scroll_Char (char myChar, u8 pos, u8 dir, u8 speed)\u003Cbr \/\u003Evoid Box(u8 speed, u8 dir, u8 state) \u003Cbr \/\u003Evoid Grid(u8 speed, u8 state)\u003Cbr \/\u003E]]\u003E\u003C\/script\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EIt is so incredibly easy to make new functions when you are just manipulating a 2D array.\u003Cbr \/\u003E\u003Cbr \/\u003EA warning before you watch the videos, they were taken with a crappy point n shoot camera so they look incredibly choppy. In real life the display is incredibly fluid and smooth. The videos do it zero justice.\u003Cbr \/\u003E\u003Ccenter\u003E\u003Cbr \/\u003E\u003Cobject width=\"425\" height=\"344\"\u003E\u003Cparam name=\"movie\" value=\"http:\/\/www.youtube.com\/v\/VOljZt9pW5g\u0026hl=en\u0026fs=1\u0026\"\u003E\u003C\/param\u003E\u003Cparam name=\"allowFullScreen\" value=\"true\"\u003E\u003C\/param\u003E\u003Cparam name=\"allowscriptaccess\" value=\"always\"\u003E\u003C\/param\u003E\u003Cembed src=\"http:\/\/www.youtube.com\/v\/VOljZt9pW5g\u0026hl=en\u0026fs=1\u0026\" type=\"application\/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"425\" height=\"344\"\u003E\u003C\/embed\u003E\u003C\/object\u003E\u003Cbr \/\u003E\u003Cobject width=\"425\" height=\"344\"\u003E\u003Cparam name=\"movie\" value=\"http:\/\/www.youtube.com\/v\/zxe39Q0XnrA\u0026hl=en\u0026fs=1\u0026\"\u003E\u003C\/param\u003E\u003Cparam name=\"allowFullScreen\" value=\"true\"\u003E\u003C\/param\u003E\u003Cparam name=\"allowscriptaccess\" value=\"always\"\u003E\u003C\/param\u003E\u003Cembed src=\"http:\/\/www.youtube.com\/v\/zxe39Q0XnrA\u0026hl=en\u0026fs=1\u0026\" type=\"application\/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"425\" height=\"344\"\u003E\u003C\/embed\u003E\u003C\/object\u003E\u003Cbr \/\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Ca href=\"https:\/\/ucfilespace.uc.edu\/~thrunml\/led_board.zip\"\u003EEagle Files \u0026 Source Code\u003C\/a\u003E [\u003Ca href=\"http:\/\/bear24rw.gotdns.com:40\/led_board.zip\"\u003EMirror\u003C\/a\u003E]\u003Cbr \/\u003EIf you re-use the design or source (which I encourage you to do) please give credit where credit is due. Also note that the entire code was literally written in a one night programming marathon since we were extremely pressed (read: it was due the next day), so there are still many bugs. Also I take no responsibility for any damage if you use my design and code (had to put a disclaimer ;))\u003Cbr \/\u003E\u003Cbr \/\u003EAny questions regarding the design or the source code should be directed at me bear24rw . gmail.com\u003Cbr \/\u003EAny questions regarding the construction of the board should be directed at John Wathen jmwathen . gmail.com"},"link":[{"rel":"replies","type":"application/atom+xml","href":"http:\/\/bear24rw.blogspot.com\/feeds\/3928132441856256669\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/2009\/10\/led-matrix.html#comment-form","title":"24 Comments"},{"rel":"edit","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default\/3928132441856256669"},{"rel":"self","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default\/3928132441856256669"},{"rel":"alternate","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/2009\/10\/led-matrix.html","title":"LED Matrix"}],"author":[{"name":{"$t":"Max Thrun"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/18216963066514872707"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"http:\/\/img1.blogblog.com\/img\/b16-rounded.gif"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"http:\/\/farm4.static.flickr.com\/3652\/3574348952_c85af6167f_t.jpg","height":"72","width":"72"},"thr$total":{"$t":"24"}},{"id":{"$t":"tag:blogger.com,1999:blog-3623515592551780770.post-2137749716190598899"},"published":{"$t":"2008-12-26T13:08:00.008-05:00"},"updated":{"$t":"2008-12-26T14:11:23.485-05:00"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"Basic Stamp"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Door Unlocker"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Keyless Entry"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Parallax"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Programming"},{"scheme":"http://www.blogger.com/atom/ns#","term":"RFID"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Servo"}],"title":{"type":"text","$t":"RFID Door Unlocker"},"content":{"type":"html","$t":"Todays world is all about efficiency, this includes getting into your dorm room. Inspired by other door unlocking projects found around the Internet, especially the \u003Ca href=\"http:\/\/www.engadget.com\/2006\/10\/21\/mit-student-hacks-his-dorm-room-door-lock\/\" target=\"new\"\u003EMIT one\u003C\/a\u003E that is practically famous, I decided it was time to outfit my own door with an RFID unlocker.\u003Cbr \/\u003E\u003Cbr \/\u003EOur dorms offer the unique benefit of having full length mirrors on the doors so I figured that suction cups would be the best way to go as they were easy to apply, remove and are non marking.\u003Cbr \/\u003E\u003Cbr \/\u003EBeing that I already had a \u003Ca href=\"http:\/\/www.parallax.com\/Store\/Microcontrollers\/BASICStampProgrammingKits\/tabid\/136\/CategoryID\/11\/List\/0\/SortField\/0\/Level\/a\/ProductID\/294\/Default.aspx\"\u003EBasic Stamp\u003C\/a\u003E, Parallax's \u003Ca href=\"http:\/\/www.parallax.com\/Store\/Microcontrollers\/BASICStampModules\/tabid\/134\/txtSearch\/RFID\/List\/1\/ProductID\/114\/Default.aspx?SortField=ProductName%2cProductName\"\u003ERFID reader\u003C\/a\u003E seemed to be the obvious choice as it was the cheapest reader I could find and already had example code written for it.\u003Cbr \/\u003E\u003Cbr \/\u003EMy initial plan involved just a servo, standoffs, and suction cups...\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3036473344\/\" target=\"new\" title=\"door_lock by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3039\/3036473344_337f9033ab.jpg\" alt=\"door_lock\" border=\"0\" height=\"500\" width=\"344\" \/\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EModeled in Autodesk Inventor...\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3036473518\/\" target=\"new\" title=\"render_1 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3047\/3036473518_32251d8445.jpg\" alt=\"render_1\" border=\"0\" height=\"375\" width=\"500\" \/\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EAfter some of the parts came in I set up a quick prototype to make sure the servo was even strong enough to flip the latch and that I could read the tag through the door. To attach the servo horn to the latch I tied a piece of string to the horn and taped it to the top of the latch, this is how it done in the final version as well. The reason for using string is so that you could still easily unlock the door with the key, it would just put slack in the string. The only fault with this method is that you cannot use the RFID tag to lock the door.\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Cobject height=\"344\" width=\"425\"\u003E\u003Cparam name=\"movie\" value=\"http:\/\/www.youtube.com\/v\/mOO9eL6x8pg\u0026amp;hl=en\u0026amp;fs=1\"\u003E\u003Cparam name=\"allowFullScreen\" value=\"true\"\u003E\u003Cparam name=\"allowscriptaccess\" value=\"always\"\u003E\u003Cembed src=\"http:\/\/www.youtube.com\/v\/mOO9eL6x8pg\u0026amp;hl=en\u0026amp;fs=1\" type=\"application\/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" height=\"344\" width=\"425\"\u003E\u003C\/embed\u003E\u003C\/object\u003E\u003C\/center\u003E\u003Cbr \/\u003EI quickly realized that I had given no thought as to how I was going to mount all the electronics. As a result the servo remained like that on my door for weeks. As I was cleaning my desk one day I found this box and instantly realized that it was perfect for the door unlocker.\u003Cbr \/\u003E\u003Cbr \/\u003EAnother quick mockup in Invetor to see if everything fit, and it did perectly..\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3040794161\/\" target=\"new\" title=\"render_4 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3186\/3040794161_eed27a5c5e.jpg\" alt=\"render_4\" border=\"0\" height=\"375\" width=\"500\" \/\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EOrdered some 6-32 screws and nuts from \u003Ca href=\"http:\/\/www.mcmaster.com\/\"\u003EMcMaster\u003C\/a\u003E and started assembly.\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3036474442\/\" target=\"new\" title=\"PB120691 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3204\/3036474442_f72043bdac.jpg\" alt=\"PB120691\" border=\"0\" height=\"500\" width=\"375\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3036474114\/\" target=\"new\" title=\"PB120690 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3213\/3036474114_459e5c5474.jpg\" alt=\"PB120690\" border=\"0\" height=\"500\" width=\"375\" \/\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EThe servo fits perfectly height wise, it sits against the bottom of the base when closed. Now that I had the servo and RFID reader mounted I needed to get some holes drilled for the suction cups and basic stamp. Due to my \u003Cdel\u003Eprocrastination\u003C\/del\u003E studying the project sat on my desk for a week.\u003Cbr \/\u003E\u003Cbr \/\u003EI finally got around to drilling the holes and mounting the whole thing...\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3036476094\/\" title=\"PB160699 by bear24rw, on Flickr\" target=\"new\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3176\/3036476094_0a94c137c0.jpg\" alt=\"PB160699\" border=\"0\" height=\"500\" width=\"375\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3035641697\/\" target=\"new\" title=\"PB160700 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3211\/3035641697_28f36f8af4.jpg\" alt=\"PB160700\" border=\"0\" height=\"500\" width=\"375\" \/\u003E\u003C\/a\u003E\u003C\/center\u003E\u003Cbr \/\u003EI used paper under the basic stamp to insulate it from the metal box.\u003Cbr \/\u003E\u003Cbr \/\u003EThe assembly did not go without problems, however.\u003Cbr \/\u003E\u003Cbr \/\u003EThe first major problem was when I went to reassemble the box after I put on the suction cups. I didn't take into consideration that the nuts would get in the way of the box closing. As you can see in the pictures I had to snip spaces in the box where the nuts were so the box would be able to close all the way.\u003Cbr \/\u003E\u003Cbr \/\u003EThe second major problem was a weird one. The RFID reader was originally going to be mounted on the inside of the box. This box was perfect because the front was plastic and didn't interfere with the reader. The problem was, when I closed everything up in the box the range of the reader was almost cut in half and I couldn't read the tag through the door. However, if I pulled the box apart (like it is being shown in the above pictures) the tag could be read through the door. My best guess is electrical noise is causing this but I honestly did not want to spend any longer on this project, and there seemed little alternatives. I ended up just mounting the reader on the outside of the box. It does not really make any difference other then looks.Here is how it looks when it is all up and running.\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Ccenter\u003E\u003Ca href=\"http:\/\/www.flickr.com\/photos\/bear24rw\/3036474834\/\" target=\"new\" title=\"PB150694 by bear24rw, on Flickr\"\u003E\u003Cimg src=\"http:\/\/farm4.static.flickr.com\/3236\/3036474834_25907ddb65.jpg\" alt=\"PB150694\" border=\"0\" height=\"500\" width=\"375\" \/\u003E\u003C\/a\u003E\u003Cbr \/\u003E\u003Cbr \/\u003E\u003Cobject height=\"344\" width=\"425\"\u003E\u003Cparam name=\"movie\" value=\"http:\/\/www.youtube.com\/v\/zbAy0aqiAsU\u0026amp;hl=en\u0026amp;fs=1\"\u003E\u003Cparam name=\"allowFullScreen\" value=\"true\"\u003E\u003Cparam name=\"allowscriptaccess\" value=\"always\"\u003E\u003Cembed src=\"http:\/\/www.youtube.com\/v\/zbAy0aqiAsU\u0026amp;hl=en\u0026amp;fs=1\" type=\"application\/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" height=\"344\" width=\"425\"\u003E\u003C\/embed\u003E\u003C\/object\u003E\u003C\/center\u003E\u003Cbr \/\u003E\u003Cbr \/\u003EThe basic stamp program can be downloaded \u003Ca href=\"http:\/\/homepages.uc.edu\/%7Ethrunml\/rfid\/rfid_unlocker.BS2\"\u003Ehere\u003C\/a\u003E"},"link":[{"rel":"replies","type":"application/atom+xml","href":"http:\/\/bear24rw.blogspot.com\/feeds\/2137749716190598899\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/2008\/12\/rfid-door-unlocker.html#comment-form","title":"34 Comments"},{"rel":"edit","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default\/2137749716190598899"},{"rel":"self","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/3623515592551780770\/posts\/default\/2137749716190598899"},{"rel":"alternate","type":"text/html","href":"http:\/\/bear24rw.blogspot.com\/2008\/12\/rfid-door-unlocker.html","title":"RFID Door Unlocker"}],"author":[{"name":{"$t":"Max Thrun"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/18216963066514872707"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"http:\/\/img1.blogblog.com\/img\/b16-rounded.gif"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"http:\/\/farm4.static.flickr.com\/3039\/3036473344_337f9033ab_t.jpg","height":"72","width":"72"},"thr$total":{"$t":"34"}}]}});