{"id":130,"date":"2008-10-08T03:16:53","date_gmt":"2008-10-08T07:16:53","guid":{"rendered":"http:\/\/www.underwater.ca\/blog\/?p=130"},"modified":"2018-09-22T03:11:45","modified_gmt":"2018-09-22T07:11:45","slug":"serial-communication-with-flash-and-processing","status":"publish","type":"post","link":"https:\/\/www.underwater.ca\/blog\/serial-communication-with-flash-and-processing\/","title":{"rendered":"Serial Communication with Flash and Processing"},"content":{"rendered":"<p><a href=\"\/blog\/wp-content\/uploads\/2008\/10\/img_2280.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-138\" title=\"img_2280\" src=\"\/blog\/wp-content\/uploads\/2008\/10\/img_2280-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" \/><\/a><\/p>\n<p>The concept of serial communication adds a whole other dimension to what you can do with the Arduino microcontroller. Communication with other applications is essential for the type of projects I would like to develop at ITP, especially for those that involve interactive video and technological live performance pieces. My excitement in learning the technical aspects of serial communication encouraged me to experiment with with two dynamic programming environments that I enjoy working with: Flash and Processing. The above images is a graph designed in ActionScript 3 that senses and reads the output values from two potentiomotor&#8217;s.\u00a0 Very useful in analyzing the behavior of inputs!<!--more--><\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2008\/10\/flash_colorchanger.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-132\" title=\"flash_colorchanger\" src=\"\/blog\/wp-content\/uploads\/2008\/10\/flash_colorchanger-300x180.jpg\" alt=\"\" width=\"300\" height=\"180\" \/><\/a><\/p>\n<p>Next, for fun I wanted to create a simple application in Flash that changes the color of canvas based on values generated from an analog sensor (in this case a pot). Unlike with Processing, to communicate with Flash you need to marshal between a network and a serial port using the serial proxy terminal. You also need an Actionscript library that sends\/receives Arduino commands over a network socket (this is built in into Processing). Here I imported the as3glue library, it works great!<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2008\/10\/flash_colorchanger_code.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-133\" title=\"flash_colorchanger_code\" src=\"\/blog\/wp-content\/uploads\/2008\/10\/flash_colorchanger_code-300x202.jpg\" alt=\"\" width=\"300\" height=\"202\" \/><\/a><\/p>\n<p>The source code for my little color changing application with a potentiometer.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2008\/10\/img_2283.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-137\" title=\"img_2283\" src=\"\/blog\/wp-content\/uploads\/2008\/10\/img_2283-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" \/><\/a><\/p>\n<p>In Flash, I also experimented with send commands with the Arduino. Here I am toggling an LED on\/off with my mouse which is acting as a push button switch.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2008\/10\/processing_graph.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-131\" title=\"processing_graph\" src=\"\/blog\/wp-content\/uploads\/2008\/10\/processing_graph-300x181.jpg\" alt=\"\" width=\"300\" height=\"181\" \/><\/a><\/p>\n<p>Experimenting with Tom Igoe&#8217;s sensor reading values graph in Processing. Establishing serial communication with Processing\u00a0 is a lot simpler than with Flash, but is still a useful envioronment to consider in some cases, such as controlling a timeline with an anlaog input. For next week&#8217;s serial communication lab, I will experiment with Max\/MSP!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The concept of serial communication adds a whole other dimension to what you can do with the Arduino microcontroller. Communication with other applications is essential for the type of projects I would like to develop at ITP, especially for those that involve interactive video and technological live performance pieces. My excitement in learning the technical [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-130","post","type-post","status-publish","format-standard","hentry","category-pcomp"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.underwater.ca\/blog\/wp-json\/wp\/v2\/posts\/130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.underwater.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.underwater.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.underwater.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.underwater.ca\/blog\/wp-json\/wp\/v2\/comments?post=130"}],"version-history":[{"count":12,"href":"https:\/\/www.underwater.ca\/blog\/wp-json\/wp\/v2\/posts\/130\/revisions"}],"predecessor-version":[{"id":2715,"href":"https:\/\/www.underwater.ca\/blog\/wp-json\/wp\/v2\/posts\/130\/revisions\/2715"}],"wp:attachment":[{"href":"https:\/\/www.underwater.ca\/blog\/wp-json\/wp\/v2\/media?parent=130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.underwater.ca\/blog\/wp-json\/wp\/v2\/categories?post=130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.underwater.ca\/blog\/wp-json\/wp\/v2\/tags?post=130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}