{"id":729,"date":"2019-03-13T11:07:31","date_gmt":"2019-03-13T10:07:31","guid":{"rendered":"https:\/\/sharedinventions.com\/?p=729"},"modified":"2019-03-13T11:07:32","modified_gmt":"2019-03-13T10:07:32","slug":"hex-game","status":"publish","type":"post","link":"https:\/\/sharedinventions.com\/?p=729","title":{"rendered":"Hex Game"},"content":{"rendered":"\n<p>For this project I was inspired by Benjamin Heckendorn, where he was building <a href=\"https:\/\/youtu.be\/cR139VP1LCQ\">a game for practicing hex numbers<\/a>. I always wanted to build that, but did not wanted to make my own PCB. Then I came across with the so called LED&amp;KEY board.<\/p>\n\n\n\n<p>Actually this is already a 3in1 game, and the binary-game mode is more popular, than the hex-game.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"2187\" height=\"1530\" src=\"https:\/\/sharedinventions.com\/wp-content\/uploads\/2019\/03\/IMG_20190313_103042.jpg\" alt=\"\" class=\"wp-image-734\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Hardware design<\/h2>\n\n\n\n<p>Led&amp;Key utilizes the TM1638 controller, that is specially design to drive LEDs and handle keyboard events . It uses a serial communication (SPI), where you can shift out your commands to the module, and shift in data corresponding the pressed keys.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>More about TM1638 <a href=\"https:\/\/os.mbed.com\/components\/TM1638-LED-controller-80-LEDs-max-Keyboa\/\">here<\/a>.<\/p><\/blockquote>\n\n\n\n<p>I wanted to make a handheld device so obviously it will run on a 18650 LiIon battery (salvaged from dead laptop batteries), and a battery charger (more about that later on).<\/p>\n\n\n\n<p>The heart of the system is an Arduino Nano. As it already provides an USB interface it is easy to upgrade the software later on with other functions we may wish (e.g. stopwatch, countdown timer). I have also added a speaker for sure. And the battery positive lead is connected to an analog pin via a megaohm resistor to have a charging level indication.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"2277\" height=\"1191\" src=\"https:\/\/sharedinventions.com\/wp-content\/uploads\/2019\/03\/LedKey_bb.png\" alt=\"\" class=\"wp-image-730\"\/><figcaption>Hex game schematic<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Charger<\/h2>\n\n\n\n<p>I have used the small green variant, that already provides 5 Volts, but I had to remove the USB output socket first to spare some space, and solder on jumper wires on the top side.<\/p>\n\n\n\n<ul class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"641\" height=\"450\" src=\"https:\/\/sharedinventions.com\/wp-content\/uploads\/2019\/03\/vlcsnap-2019-03-13-08h55m42s376.jpg\" alt=\"\" data-id=\"731\" data-link=\"https:\/\/sharedinventions.com\/?attachment_id=731\" class=\"wp-image-731\"\/><\/figure><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">The case<\/h2>\n\n\n\n<p>I have designed the case in OnShape. The idea here, is that the cover board can be printed in two halfs.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Onshape link: <a href=\"https:\/\/cad.onshape.com\/documents\/843f834a9045be5e69c0daf2\/w\/cfc8e513198a1c4e681ebb89\/e\/ef071edf4700391be162cb57\">https:\/\/cad.onshape.com\/documents\/843f834a9045be5e69c0daf2\/w\/cfc8e513198a1c4e681ebb89\/e\/ef071edf4700391be162cb57<\/a><\/p><p>Thingiverse: <a href=\"https:\/\/www.thingiverse.com\/thing:2794902\">https:\/\/www.thingiverse.com\/thing:2794902<\/a><\/p><\/blockquote>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1082\" height=\"893\" src=\"https:\/\/sharedinventions.com\/wp-content\/uploads\/2019\/03\/Screen-Shot-2019-03-13-at-09.05.12.png\" alt=\"\" class=\"wp-image-732\"\/><figcaption>Case design in Onshape<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">The software<\/h2>\n\n\n\n<p>The software written by a friend of mine. (So no support for it from my side \ud83d\ude42 )<\/p>\n\n\n\n<p>You can switch game modes (and other things) by press-and-hold the leftmost key, and press keys 2-8.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Key 2 &#8211; Binary game (this is the startup default game)<\/li><li>Key 3 &#8211; Ternary game (for advanced users only)<\/li><li>Key 4 &#8211; Hex game (the easiest one in my opinion)<\/li><\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Download software from: <a href=\"https:\/\/pastebin.com\/Du4uG2rD\">https:\/\/pastebin.com\/Du4uG2rD<\/a><br><\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">YouTube video<\/h2>\n\n\n\n<p>(may be inserted later on)<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For this project I was inspired by Benjamin Heckendorn, where he was building a game for practicing hex numbers. I always wanted to build that, but did not wanted to make my own PCB. Then I came across with the so called LED&amp;KEY board. Actually this is already a 3in1 game, and the binary-game mode\u2026 <span class=\"read-more\"><a href=\"https:\/\/sharedinventions.com\/?p=729\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":734,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,6,12],"tags":[],"class_list":["post-729","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-gadgets","category-projects"],"_links":{"self":[{"href":"https:\/\/sharedinventions.com\/index.php?rest_route=\/wp\/v2\/posts\/729","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sharedinventions.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sharedinventions.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sharedinventions.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sharedinventions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=729"}],"version-history":[{"count":3,"href":"https:\/\/sharedinventions.com\/index.php?rest_route=\/wp\/v2\/posts\/729\/revisions"}],"predecessor-version":[{"id":736,"href":"https:\/\/sharedinventions.com\/index.php?rest_route=\/wp\/v2\/posts\/729\/revisions\/736"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sharedinventions.com\/index.php?rest_route=\/wp\/v2\/media\/734"}],"wp:attachment":[{"href":"https:\/\/sharedinventions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sharedinventions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sharedinventions.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}