{"id":200,"date":"2013-12-11T23:06:21","date_gmt":"2013-12-12T05:06:21","guid":{"rendered":"http:\/\/www.scorchworks.com\/Blog\/?p=200"},"modified":"2024-05-01T20:12:14","modified_gmt":"2024-05-02T01:12:14","slug":"simon-hack-a-daying","status":"publish","type":"post","link":"https:\/\/www.scorchworks.com\/Blog\/simon-hack-a-daying\/","title":{"rendered":"Simon Hack a Day&#8217;ing"},"content":{"rendered":"<p><img decoding=\"async\" alt=\"Simon\" src=\"http:\/\/www.scorchworks.com\/Blog\/wp-content\/uploads\/simon_anim.gif\" \/><br \/>\nHack a Day is having another <a href=\"http:\/\/hackaday.com\/2013\/12\/03\/new-contest-win-one-of-20-microchip-fubarino-boards\/\">contest<\/a>.\u00a0 This time it is a microcontroller based contest.\u00a0 The entries need to hide <a href=\"http:\/\/hackaday.com\">hackaday.com<\/a> in a microcontroller project as an Easter egg.\u00a0 The extent of my experience with microcontrollers was soldering together at a Simon project at a Maker Faire a few years back.\u00a0 I have been meaning to buy an FTDI board to program the Simon for a while now but never seemed to get around to it.\u00a0 When the Hack a Day contest launched I decided now was the time to give it a shot.<\/p>\n<p>A few days later with the FTDI in hand it was time to start creating my Easter egg.\u00a0 I downloaded the original source code for the Simon (available on the <a href=\"http:\/\/www.sparkfun.com\/products\/10547\">Sparkfun<\/a> web site) and started adding my own code to incorporate the Hack a Day URL.\u00a0 What I came up with is a fully functional Simon game with a couple of minor twists.\u00a0 The first change is that when Simon is playing the sequence of buttons for the player to repeat.\u00a0 The sequence is played by Simon in an irregular pattern which is actually Morse code for &#8220;hackaday.com&#8221;.\u00a0 When playing the game it is clear that the timing is a little off but it hard to tell it s Morse code because the tones change with the different colored buttons.\u00a0 The video below shows the Simon playing with the modified program.<\/p>\n<p>Game Play Video: <a href=\"http:\/\/www.scorchworks.com\/video\/play_game.mp4\">Game Play Video Direct Link<\/a><br \/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\"\/><br \/>\n<video width=\"320\" height=\"240\" controls ><source src=\"http:\/\/www.scorchworks.com\/video\/play_game.mp4\" type=\"video\/mp4\"><source src=\"http:\/\/www.scorchworks.com\/video\/play_game.ogg\" type=\"video\/ogg\"><\/video><\/p>\n<p>Since I am not great at playing the Simon game I added another method to generate the full Morse code for &#8220;hackaday.com&#8221;.\u00a0 Usually to start the Simon game the player needs to push one of the buttons to initiate the beginning of a new game.\u00a0 I modified the program to detect if two buttons are pressed rather than one.\u00a0 With the modified program when two buttons are pressed at the same time the Morse code it pulsed out prior to the game starting.\u00a0 The video below shows the full Hack a Day URL being played by Simon.<\/p>\n<p>Two Button Press Video: <a href=\"http:\/\/www.scorchworks.com\/video\/morse_code.mp4\">Two Button Press Video Direct Link<\/a><br \/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\"\/><br \/>\n<video width=\"320\" height=\"240\" controls ><source src=\"http:\/\/www.scorchworks.com\/video\/morse_code.mp4\" type=\"video\/mp4\"><source src=\"http:\/\/www.scorchworks.com\/video\/morse_code.ogg\" type=\"video\/ogg\"><\/video><\/p>\n<p>I have uploaded my modified code here:\u00a0<a href=\"http:\/\/www.scorchworks.com\/Simon_Game_Code_with_morse_code.ino \">Simon_Game_Code_with_morse_code.ino<\/a>. I included all of the letter codes in my look-up function so the Morse code message can easily be changed.\u00a0 The length of the game is automatically adjusted to the length of the string entered in the egg array.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hack a Day is having another contest.\u00a0 This time it is a microcontroller based contest.\u00a0..<\/p>\n","protected":false},"author":1,"featured_media":202,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/www.scorchworks.com\/Blog\/wp-json\/wp\/v2\/posts\/200"}],"collection":[{"href":"https:\/\/www.scorchworks.com\/Blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scorchworks.com\/Blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scorchworks.com\/Blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scorchworks.com\/Blog\/wp-json\/wp\/v2\/comments?post=200"}],"version-history":[{"count":31,"href":"https:\/\/www.scorchworks.com\/Blog\/wp-json\/wp\/v2\/posts\/200\/revisions"}],"predecessor-version":[{"id":235,"href":"https:\/\/www.scorchworks.com\/Blog\/wp-json\/wp\/v2\/posts\/200\/revisions\/235"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scorchworks.com\/Blog\/wp-json\/wp\/v2\/media\/202"}],"wp:attachment":[{"href":"https:\/\/www.scorchworks.com\/Blog\/wp-json\/wp\/v2\/media?parent=200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scorchworks.com\/Blog\/wp-json\/wp\/v2\/categories?post=200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scorchworks.com\/Blog\/wp-json\/wp\/v2\/tags?post=200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}