{"id":154,"date":"2013-03-07T18:43:50","date_gmt":"2013-03-08T02:43:50","guid":{"rendered":"http:\/\/robertbyam.com\/ces\/?p=154"},"modified":"2025-03-18T14:26:19","modified_gmt":"2025-03-18T22:26:19","slug":"gamepad-teensy-code","status":"publish","type":"post","link":"https:\/\/robertbyam.com\/ces\/2013\/03\/07\/gamepad-teensy-code\/","title":{"rendered":"Gamepad Teensy Code"},"content":{"rendered":"<p>I finished the Teensy gamepad code I&#8217;ll be using for the gamepads back in January.\u00a0 The base code allows me to very easily configure the number of buttons, the name it shows up as in Windows, and a serial number.<\/p>\n<p>I have made this code available as Open Source for anyone interested at <a href=\"http:\/\/robertbyam.com\/code\">http:\/\/robertbyam.com\/code<\/a><\/p>\n<p>In other news, I&#8217;ve successfully written a small library that allows me to find out what USB device is attached to a specific USB port on the computer.\u00a0 I have a small 4 port USB hub that will be inside the computer and plugged directly into the motherboard, and the 4 ports will be on the front of the NES case where the original NES controllers would plug in.\u00a0 I search all USB devices on the system for this specific hub, which I find by the manufacturer and product IDs.\u00a0 I can then tell what is plugged into each of the 4 ports on the hub.<\/p>\n<p>Using this information, I will be able to show at the bottom of the main CES screen what controllers are plugged in, and also show which will be player 1, 2, etc. whenever a specific game is selected, as well as which controllers are disabled because they don&#8217;t have enough buttons.\u00a0 This way, it will work similar to the original Nintendo, where the player number was determined by what spot the controller was plugged into.<\/p>\n<p>I built one NES controller with the Teensy inside, and it just barely fits and works well.\u00a0 I also got some SNES controllers off of ebay, and they are thicker, so there will be too much room.\u00a0 I&#8217;ll have to glue the Teensy down so it doesn&#8217;t rattle around inside.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I finished the Teensy gamepad code I&#8217;ll be using for the gamepads back in January.\u00a0 The base code allows me to very easily configure the number of buttons, the name it shows up as in Windows, and a serial number. I have made this code available as Open Source for anyone interested at http:\/\/robertbyam.com\/code In [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-154","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/posts\/154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":5,"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"predecessor-version":[{"id":205,"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/posts\/154\/revisions\/205"}],"wp:attachment":[{"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}