{"id":1198,"date":"2012-06-08T08:05:46","date_gmt":"2012-06-08T11:05:46","guid":{"rendered":"http:\/\/blog.generaleccentric.net\/?p=1198"},"modified":"2013-01-25T22:18:37","modified_gmt":"2013-01-26T01:18:37","slug":"note-to-self-use-tellymate-when-debugging-arduino","status":"publish","type":"post","link":"http:\/\/blog.generaleccentric.net\/?p=1198","title":{"rendered":"Note to self: Use Tellymate when Debugging Arduino!"},"content":{"rendered":"<p><a href=\"http:\/\/blog.generaleccentric.net\/wp-content\/uploads\/2012\/06\/IMG_0950.jpg\" rel=\"lightbox[1198]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright  wp-image-1219\" title=\"Tellymate screen\" src=\"http:\/\/blog.generaleccentric.net\/wp-content\/uploads\/2012\/06\/IMG_0950-1024x768.jpg\" alt=\"\" width=\"200\" height=\"150\" \/><\/a><a href=\"http:\/\/www.batsocks.co.uk\/products\/Shields\/TellyMate%20Shield.htm\">Tellymate<\/a> is an Arduino shield that outputs all <em>Serial.print()<\/em> commands to a television (NTSC or PAL composite video). I&#8217;ve had one kicking around for a couple of years now. I bought it thinking that I&#8217;d like to build a \u201cnew\u201d kind of interface\/display. I even bought an inexpensive portable TV\/DVD player for the purpose. That project is still on my \u2018to-do\u2019 list, but I had another problem\u2014that Tellymate solved simply and elegantly.<\/p>\n<p>I&#8217;ve been picking at the <a title=\"Introducing Media Circus\" href=\"http:\/\/blog.generaleccentric.net\/?p=960\">Media Circus<\/a> project for about year, making improvements, letting it run to see if any bugs cropped up. Media Circus is a scrolling marquee that displays amusing headline news mashups. It receives updates from Twitter once a day, early in the morning. To do this, it needs to self-reset. This is not simply a matter of running a wire from a digital output pin to the Reset pin on the Arduino. A dependable self-reset requires a delay and \u2018safety switch\u2019 circuit.<\/p>\n<h3>The Problem\u2026<\/h3>\n<p>Because the unit resets only once a day, I needed several days to test it. It seemed to work as designed with more frequent resets using a test program, but when I incorporated my reset code into the Media Circus sketch and let it run, I discovered that it would reset the first time, but never again. I needed to know what was going on in the program. Using the Arduino IDE, if you want Arduino to tell you what state it&#8217;s in at various points, you drop in Serial.print() statements and then open Arduino&#8217;s Serial Monitor. For short runs, this works, but Serial Monitor sometimes crashes if you give it lots of data to display over a long period of time. Additionally, when the system resets, it closes the Serial Monitor.<\/p>\n<p>My next thought was to bypass Serial Monitor and attach a small LCD screen to show the various values. I tried the Arduino built-in LiquidCrystal library, but it didn&#8217;t work for me with the particular arrangement of hardware and software\u2014I wasn&#8217;t able to figure out precisely why. Next, I tried a different library, <a href=\"http:\/\/code.google.com\/p\/arduinoshiftreglcd\/\">arduinoshiftreglcd<\/a>, which worked with the MEGA and the Ethernet Shield, but failed when in the presence of the Ethernet or EthernetUDP libraries. I was about to look at the <a href=\"https:\/\/bitbucket.org\/fmalpartida\/new-liquidcrystal\/wiki\/Home\">New LiquidCrystal<\/a> library, when I remembered the Tellymate.<\/p>\n<h3>The Solution\u2026<\/h3>\n<p>Tellymate doesn&#8217;t require any additional code: if you can print to the Serial Monitor, it will show up on the TV. But there are two very simple functions that Batsocks provides that were useful to me: <em>screen_clear<\/em> and <em>cursor_move<\/em>. My TV display shows the number of seconds since midnight, the rough geographic location (Beijing\/Moscow\/London\/Halifax\/Vancouver) and Daylight Savings Time\/Standard Time, and the <a href=\"http:\/\/www.epochconverter.com\/\">epoch time<\/a> at reset. This has finally allowed me to find\u2014and solve\u2014the problem!<\/p>\n<p>And now, for today&#8217;s headline (June 8, 2012):<\/p>\n<p><span style=\"color: #c64c39;\"><em><strong>Small plane crashes on who&#8217;s giving it all away<\/strong><\/em><\/span><\/p>\n<p>You can look at <a href=\"http:\/\/generaleccentric.net\/cutup\/cutup.php\">the other headlines that are running on Media Circus<\/a>, or <a href=\"http:\/\/twitter.com\/generalxcentric\">follow General Eccentric<\/a>.<\/p>\n<div id='gallery-1' class='gallery galleryid-1198 gallery-columns-2 gallery-size-thumbnail'><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='http:\/\/blog.generaleccentric.net\/wp-content\/uploads\/2012\/06\/IMG_0951-e1339103822482.jpg' rel=\"lightbox[1198]\"><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"150\" src=\"http:\/\/blog.generaleccentric.net\/wp-content\/uploads\/2012\/06\/IMG_0951-e1339103822482.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='http:\/\/blog.generaleccentric.net\/wp-content\/uploads\/2012\/06\/IMG_0949-e1339103687869.jpg' rel=\"lightbox[1198]\"><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"150\" src=\"http:\/\/blog.generaleccentric.net\/wp-content\/uploads\/2012\/06\/IMG_0949-e1339103687869.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='http:\/\/blog.generaleccentric.net\/wp-content\/uploads\/2012\/06\/IMG_0948-e1339103064438.jpg' rel=\"lightbox[1198]\"><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"150\" src=\"http:\/\/blog.generaleccentric.net\/wp-content\/uploads\/2012\/06\/IMG_0948-e1339103064438.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='http:\/\/blog.generaleccentric.net\/wp-content\/uploads\/2012\/06\/IMG_0950.jpg' rel=\"lightbox[1198]\"><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"150\" src=\"http:\/\/blog.generaleccentric.net\/wp-content\/uploads\/2012\/06\/IMG_0950.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure>\n\t\t<\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Tellymate is an Arduino shield that outputs all Serial.print() commands to a television (NTSC or PAL composite video). I&#8217;ve had one kicking around for a couple of years now. I bought it thinking that I&#8217;d like to build a \u201cnew\u201d kind of interface\/display. I even bought an inexpensive portable TV\/DVD player for the purpose. That &hellip; <a href=\"http:\/\/blog.generaleccentric.net\/?p=1198\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Note to self: Use Tellymate when Debugging Arduino!<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_links_to":"","_links_to_target":"","footnotes":""},"categories":[23,102,22,55],"tags":[20,76],"class_list":["post-1198","post","type-post","status-publish","format-standard","hentry","category-arduino-electronics","category-design","category-electronics","category-the-technology-of-good-intentions","tag-arduino","tag-tellymate"],"_links":{"self":[{"href":"http:\/\/blog.generaleccentric.net\/index.php?rest_route=\/wp\/v2\/posts\/1198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.generaleccentric.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.generaleccentric.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.generaleccentric.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.generaleccentric.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1198"}],"version-history":[{"count":26,"href":"http:\/\/blog.generaleccentric.net\/index.php?rest_route=\/wp\/v2\/posts\/1198\/revisions"}],"predecessor-version":[{"id":1230,"href":"http:\/\/blog.generaleccentric.net\/index.php?rest_route=\/wp\/v2\/posts\/1198\/revisions\/1230"}],"wp:attachment":[{"href":"http:\/\/blog.generaleccentric.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.generaleccentric.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1198"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.generaleccentric.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}