{"id":102,"date":"2008-10-09T03:52:06","date_gmt":"2008-10-09T07:52:06","guid":{"rendered":"http:\/\/mikelberman.com\/blog\/?p=102"},"modified":"2008-10-09T03:52:06","modified_gmt":"2008-10-09T07:52:06","slug":"serial-communication","status":"publish","type":"post","link":"http:\/\/mikelberman.com\/blog\/?p=102","title":{"rendered":"Serial Communication"},"content":{"rendered":"<p>A great milestone has passed &#8211; Processing &amp; Arduino are finally on speaking terms.\u00a0 What does this mean?\u00a0 One can finally have something they physically constructed control software, and therefor control a computer, or have an intricate piece of software control something physical.<\/p>\n<p>To graph the input voltage of a sensor, we change the type of serial communication from decimal to byte.\u00a0 While this renders the Arduino information useless, we get a much more useful graph in Processing.<\/p>\n<div id=\"attachment_105\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/mikelberman.com\/blog\/wp-content\/uploads\/serialbyte.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-105\" class=\"size-medium wp-image-105\" title=\"Serial in byte mode\" src=\"http:\/\/mikelberman.com\/blog\/wp-content\/uploads\/serialbyte-300x216.jpg\" alt=\"this is your byte on drugs\" width=\"300\" height=\"216\" \/><\/a><p id=\"caption-attachment-105\" class=\"wp-caption-text\">this is your byte on drugs<\/p><\/div>\n<div id=\"attachment_106\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/mikelberman.com\/blog\/wp-content\/uploads\/serialgraph.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-106\" class=\"size-medium wp-image-106\" title=\"serial graph\" src=\"http:\/\/mikelberman.com\/blog\/wp-content\/uploads\/serialgraph-300x117.jpg\" alt=\"Real-time graphs are much better at understanding your sensor\" width=\"300\" height=\"117\" \/><\/a><p id=\"caption-attachment-106\" class=\"wp-caption-text\">Real-time graphs are much better at understanding your sensor<\/p><\/div>\n<p>In this instance my ultrasonic sensor (essentially cheap sonar) isn&#8217;t giving me a very broad range of results, but we can always use the map() function for dem apples.<\/p>\n<div id=\"attachment_107\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/mikelberman.com\/blog\/wp-content\/uploads\/ultrasonic.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-107\" class=\"size-medium wp-image-107\" title=\"ultrasonic\" src=\"http:\/\/mikelberman.com\/blog\/wp-content\/uploads\/ultrasonic-300x276.jpg\" alt=\"step off me dawg\" width=\"300\" height=\"276\" \/><\/a><p id=\"caption-attachment-107\" class=\"wp-caption-text\">step off me dawg<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>A great milestone has passed &#8211; Processing &amp; Arduino are finally on speaking terms.\u00a0 What does this mean?\u00a0 One can finally have something they physically constructed control software, and therefor control a computer, or have an intricate piece of software control something physical. To graph the input voltage of a sensor, we change the type [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,1],"tags":[],"class_list":["post-102","post","type-post","status-publish","format-standard","hentry","category-physical-computing","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/mikelberman.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/mikelberman.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mikelberman.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mikelberman.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/mikelberman.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=102"}],"version-history":[{"count":5,"href":"http:\/\/mikelberman.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/102\/revisions"}],"predecessor-version":[{"id":115,"href":"http:\/\/mikelberman.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/102\/revisions\/115"}],"wp:attachment":[{"href":"http:\/\/mikelberman.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mikelberman.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=102"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mikelberman.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}