{"id":790,"date":"2012-01-24T16:41:07","date_gmt":"2012-01-24T21:41:07","guid":{"rendered":"http:\/\/blog.danjoannis.com\/?p=790"},"modified":"2012-05-18T21:59:47","modified_gmt":"2012-05-19T02:59:47","slug":"final-project-menu-system","status":"publish","type":"post","link":"https:\/\/blog.danjoannis.com\/?p=790","title":{"rendered":"Final Project &#8211; Menu System!"},"content":{"rendered":"<p>Over the winter break I didn&#8217;t do any work on my third year project, though I told myself I should. So, when the semester began, I was at the same stage as before the break:<\/p>\n<ul>\n<li>Real-Time Clock functional<\/li>\n<li>Relay triggering functional<\/li>\n<li>Changeable target temperature with buttons<\/li>\n<li>Status display on LCD<\/li>\n<\/ul>\n<p>A menu system is completely necessary for a thermostat of this complexity; options to change backlight colour, configure the time, modify schedule, and others, can only be practically configured through a menu.<\/p>\n<p>This was the result of an hour or two of work:<\/p>\n<p><a href=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Menu.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-791\" title=\"Menu\" src=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Menu-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Menu-300x225.jpg 300w, https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Menu-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Look past the break to also see a video demo of the menu interface!<\/p>\n<p><!--more--><\/p>\n<p>It is kind of empty right now, since it is still in development, but the system is quite simple:<\/p>\n<ol>\n<li>Hit the\u00a0centre\u00a0button to enter or exit the menu<\/li>\n<li>Navigate up and down the options at that menu level: the currently selection option has a &#8220;+&#8221; before it, and the others have a &#8220;-&#8220;.<\/li>\n<li>Hit the right button to enter the selected sub-menu. Hit the left button to go back a level.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Idle-Screen.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-797\" title=\"Idle Screen\" src=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Idle-Screen-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Idle-Screen-300x225.jpg 300w, https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Idle-Screen-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The first menu item I configured was the LED menu, which allows you to change the colour of the backlight.<\/p>\n<p>By default, it is configured for &#8220;white&#8221;, which is a combination of red, green, and blue light. It looks more blue than white, but it is as close as possible.<\/p>\n<p><a href=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Backlight-Red.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-793\" title=\"Backlight Red\" src=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Backlight-Red-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Backlight-Red-300x225.jpg 300w, https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Backlight-Red-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The first version of the menu (not pictured) only included white, red, green, and blue, which are the simplest to implement. As soon as this was functional, however, I immediately expanded the list to include all combinations of these colours. This resulted in a total of 7 backlight options.<\/p>\n<p><a href=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Backlight-Green.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-792\" title=\"Backlight Green\" src=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Backlight-Green-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Backlight-Green-300x225.jpg 300w, https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Backlight-Green-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>In addition to creating this menu system, and on the advice of my friend <a href=\"http:\/\/matthewdurr.com\">Matt Durr<\/a>, I added a boot screen logo. It appears for a little under two second.<\/p>\n<p><a href=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Boot-Screen.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-794\" title=\"Boot Screen\" src=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Boot-Screen-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Boot-Screen-300x225.jpg 300w, https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Boot-Screen-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>As you can gather in the above image, I have a tentative name for the project, &#8220;ConnectedControl&#8221;. The name draws attention to the wireless connection, and the additional control available by having computer connectivity.<\/p>\n<p>The LCD display being used is the <a href=\"http:\/\/www.adafruit.com\/products\/438\">ST7565 Graphical Negative LCD<\/a> from Adafruit. She includes some libraries to use with this display, which I found included a lot of unnecessary code and needed some work to clean up\/optimize for my project. Also included with these libraries was the <a href=\"http:\/\/sourceforge.net\/projects\/bmp2glcd\/\">bmp2glcd<\/a>\u00a0utility, a command-line tool which will convert a bitmap image file into an array for use with a graphical LCD in an embedded design.<\/p>\n<p><span style=\"text-decoration: underline;\">bmp2glcd<\/span><\/p>\n<p>Here is an important comment about bmp2glcd, when used with this LCD display. Unfortunately, it isn&#8217;t a convert-copy-paste operation. There are two steps you need to do in order to generate a useful image on the LCD.<\/p>\n<ol>\n<li>Flip the image vertically (over the horizontal axis) before converting it with the utility. Otherwise, it will be upside down when converted.<\/li>\n<li>The array is divided into 8 blocks. These are in the wrong order (8, 7, 6&#8230; rather than 1, 2, 3&#8230;). You need to copy the last block, paste is at the beginning, and continue until all blocks have been reorganized.<\/li>\n<\/ol>\n<p><span style=\"text-decoration: underline;\">Final Remarks<\/span><\/p>\n<p>Plenty of work remains until the firmware is complete. At this point, more menu items need to be added, the ability the change time being my current task.<\/p>\n<p>Other tasks:<\/p>\n<ol>\n<li>Make idle screen more attractive<\/li>\n<li>Include the option to switch from heating to cooling<\/li>\n<li>Create the scheduler system (perhaps the most involved task)<\/li>\n<li>Generate a system that can determine the day of the week based on the day\/month\/year<\/li>\n<li>Also allow it to determine whether it is a leap year or not<\/li>\n<li>Implement a temperature override function<\/li>\n<\/ol>\n<p>I&#8217;m pleased with my progress so far, however, and every success keeps me motivated to finish this project!<\/p>\n<p><a href=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Idle-Screen.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-797\" title=\"Idle Screen\" src=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Idle-Screen-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Idle-Screen-300x225.jpg 300w, https:\/\/blog.danjoannis.com\/wp-content\/uploads\/2012\/01\/Idle-Screen-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><span style=\"text-decoration: underline;\">Video Demo<\/span><\/p>\n<p><object style=\"height: 360px; width: 600px;\" width=\"600\" height=\"360\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"allowFullScreen\" value=\"true\" \/><param name=\"allowScriptAccess\" value=\"always\" \/><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/7xlfjFQkZxU?version=3\" \/><param name=\"allowfullscreen\" value=\"true\" \/><param name=\"allowscriptaccess\" value=\"always\" \/><embed style=\"height: 360px; width: 600px;\" width=\"600\" height=\"360\" type=\"application\/x-shockwave-flash\" src=\"http:\/\/www.youtube.com\/v\/7xlfjFQkZxU?version=3\" allowFullScreen=\"true\" allowScriptAccess=\"always\" allowfullscreen=\"true\" allowscriptaccess=\"always\" \/><\/object><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over the winter break I didn&#8217;t do any work on my third year project, though I told myself I should. So, when the semester began, I was at the same stage as before the break: Real-Time Clock functional Relay triggering functional Changeable target temperature with buttons Status display on LCD A menu system is completely [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,222,7,8,9],"tags":[225,308,223,71,72,224,226,221],"class_list":["post-790","post","type-post","status-publish","format-standard","hentry","category-electronics","category-final-project","category-projects","category-school","category-software","tag-bmp2glcd","tag-final-project","tag-firmware","tag-lcd","tag-led","tag-menu","tag-rgb","tag-st7565"],"_links":{"self":[{"href":"https:\/\/blog.danjoannis.com\/index.php?rest_route=\/wp\/v2\/posts\/790","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.danjoannis.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.danjoannis.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.danjoannis.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.danjoannis.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=790"}],"version-history":[{"count":4,"href":"https:\/\/blog.danjoannis.com\/index.php?rest_route=\/wp\/v2\/posts\/790\/revisions"}],"predecessor-version":[{"id":936,"href":"https:\/\/blog.danjoannis.com\/index.php?rest_route=\/wp\/v2\/posts\/790\/revisions\/936"}],"wp:attachment":[{"href":"https:\/\/blog.danjoannis.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=790"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.danjoannis.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=790"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.danjoannis.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=790"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}