{ "patcher" : { "fileversion" : 1, "rect" : [ 73.0, 90.0, 781.0, 626.0 ], "bglocked" : 0, "defrect" : [ 73.0, 90.0, 781.0, 626.0 ], "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], "openinpresentation" : 0, "default_fontsize" : 12.0, "default_fontface" : 0, "default_fontname" : "Arial", "gridonopen" : 0, "gridsize" : [ 15.0, 15.0 ], "gridsnaponopen" : 0, "toolbarvisible" : 1, "boxanimatetime" : 200, "imprint" : 0, "boxes" : [ { "box" : { "maxclass" : "comment", "text" : "Physical Pixel\n\nThis patch sends an ASCII H or an ASCII L out the serial port to turn on an LED attached to an Arduino board. It can also send alternating H and L characters once every second to make the LED blink.\n\ncreated 2006\nby David A. Mellis\nmodified 14 Apr 2009\nby Scott Fitzgerald and Tom Igoe", "linecount" : 11, "numinlets" : 1, "fontsize" : 12.0, "numoutlets" : 0, "patching_rect" : [ 14.0, 35.0, 354.0, 158.0 ], "id" : "obj-1", "fontname" : "Arial" } } , { "box" : { "maxclass" : "comment", "text" : "Click to blink every second", "numinlets" : 1, "fontsize" : 12.0, "numoutlets" : 0, "patching_rect" : [ 99.0, 251.0, 161.0, 20.0 ], "id" : "obj-38", "fontname" : "Arial" } } , { "box" : { "maxclass" : "toggle", "numinlets" : 1, "numoutlets" : 1, "patching_rect" : [ 74.0, 251.0, 21.0, 21.0 ], "outlettype" : [ "int" ], "id" : "obj-39" } } , { "box" : { "maxclass" : "newobj", "text" : "p blink", "numinlets" : 2, "fontsize" : 12.0, "numoutlets" : 1, "patching_rect" : [ 74.0, 286.0, 45.0, 20.0 ], "outlettype" : [ "int" ], "id" : "obj-37", "fontname" : "Arial", "patcher" : { "fileversion" : 1, "rect" : [ 54.0, 94.0, 640.0, 480.0 ], "bglocked" : 0, "defrect" : [ 54.0, 94.0, 640.0, 480.0 ], "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], "openinpresentation" : 0, "default_fontsize" : 10.0, "default_fontface" : 0, "default_fontname" : "Verdana", "gridonopen" : 0, "gridsize" : [ 25.0, 25.0 ], "gridsnaponopen" : 0, "toolbarvisible" : 1, "boxanimatetime" : 200, "imprint" : 0, "boxes" : [ { "box" : { "maxclass" : "newobj", "text" : "* 1000", "numinlets" : 2, "fontsize" : 10.0, "numoutlets" : 1, "patching_rect" : [ 200.0, 150.0, 46.0, 19.0 ], "outlettype" : [ "int" ], "id" : "obj-12", "fontname" : "Verdana" } } , { "box" : { "maxclass" : "inlet", "numinlets" : 0, "numoutlets" : 1, "patching_rect" : [ 200.0, 75.0, 25.0, 25.0 ], "outlettype" : [ "" ], "id" : "obj-11", "comment" : "" } } , { "box" : { "maxclass" : "toggle", "numinlets" : 1, "numoutlets" : 1, "patching_rect" : [ 125.0, 250.0, 20.0, 20.0 ], "outlettype" : [ "int" ], "id" : "obj-10" } } , { "box" : { "maxclass" : "newobj", "text" : "metro 1000", "numinlets" : 2, "fontsize" : 10.0, "numoutlets" : 1, "patching_rect" : [ 115.0, 190.0, 69.0, 19.0 ], "outlettype" : [ "bang" ], "id" : "obj-3", "fontname" : "Verdana" } } , { "box" : { "maxclass" : "outlet", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 125.0, 400.0, 25.0, 25.0 ], "id" : "obj-2", "comment" : "" } } , { "box" : { "maxclass" : "inlet", "numinlets" : 0, "numoutlets" : 1, "patching_rect" : [ 100.0, 25.0, 25.0, 25.0 ], "outlettype" : [ "int" ], "id" : "obj-1", "comment" : "" } } ], "lines" : [ { "patchline" : { "source" : [ "obj-3", 0 ], "destination" : [ "obj-10", 0 ], "hidden" : 0, "midpoints" : [ ] } } , { "patchline" : { "source" : [ "obj-10", 0 ], "destination" : [ "obj-2", 0 ], "hidden" : 0, "midpoints" : [ ] } } , { "patchline" : { "source" : [ "obj-1", 0 ], "destination" : [ "obj-3", 0 ], "hidden" : 0, "midpoints" : [ ] } } , { "patchline" : { "source" : [ "obj-11", 0 ], "destination" : [ "obj-12", 0 ], "hidden" : 0, "midpoints" : [ ] } } , { "patchline" : { "source" : [ "obj-12", 0 ], "destination" : [ "obj-3", 1 ], "hidden" : 0, "midpoints" : [ ] } } ] } , "saved_object_attributes" : { "globalpatchername" : "", "default_fontsize" : 10.0, "fontface" : 0, "fontsize" : 10.0, "default_fontface" : 0, "default_fontname" : "Verdana", "fontname" : "Verdana" } } } , { "box" : { "maxclass" : "comment", "text" : "convert to int", "numinlets" : 1, "fontsize" : 12.0, "numoutlets" : 0, "patching_rect" : [ 154.0, 386.0, 104.0, 20.0 ], "id" : "obj-36", "fontname" : "Arial" } } , { "box" : { "maxclass" : "comment", "text" : "send L if 0, H if 1", "numinlets" : 1, "fontsize" : 12.0, "numoutlets" : 0, "patching_rect" : [ 154.0, 361.0, 104.0, 20.0 ], "id" : "obj-35", "fontname" : "Arial" } } , { "box" : { "maxclass" : "comment", "text" : "is it on or off?", "numinlets" : 1, "fontsize" : 12.0, "numoutlets" : 0, "patching_rect" : [ 179.0, 336.0, 95.0, 20.0 ], "id" : "obj-34", "fontname" : "Arial" } } , { "box" : { "maxclass" : "newobj", "text" : "atoi", "numinlets" : 3, "fontsize" : 12.0, "numoutlets" : 1, "patching_rect" : [ 279.0, 386.0, 46.0, 20.0 ], "outlettype" : [ "list" ], "id" : "obj-33", "fontname" : "Arial" } } , { "box" : { "maxclass" : "message", "text" : "H", "numinlets" : 2, "fontsize" : 10.0, "numoutlets" : 1, "patching_rect" : [ 329.0, 361.0, 32.5, 17.0 ], "outlettype" : [ "" ], "id" : "obj-32", "fontname" : "Verdana" } } , { "box" : { "maxclass" : "message", "text" : "L", "numinlets" : 2, "fontsize" : 10.0, "numoutlets" : 1, "patching_rect" : [ 279.0, 361.0, 32.5, 17.0 ], "outlettype" : [ "" ], "id" : "obj-31", "fontname" : "Verdana" } } , { "box" : { "maxclass" : "newobj", "text" : "select 0 1", "numinlets" : 1, "fontsize" : 12.0, "numoutlets" : 3, "patching_rect" : [ 279.0, 336.0, 62.0, 20.0 ], "outlettype" : [ "bang", "bang", "" ], "id" : "obj-25", "fontname" : "Arial" } } , { "box" : { "maxclass" : "comment", "text" : "Click to turn the LED on and off", "linecount" : 2, "numinlets" : 1, "fontsize" : 12.0, "numoutlets" : 0, "patching_rect" : [ 130.0, 205.0, 143.0, 34.0 ], "id" : "obj-24", "fontname" : "Arial" } } , { "box" : { "maxclass" : "toggle", "numinlets" : 1, "numoutlets" : 1, "patching_rect" : [ 279.0, 211.0, 24.0, 24.0 ], "outlettype" : [ "int" ], "id" : "obj-23" } } , { "box" : { "maxclass" : "newobj", "text" : "select 0 1", "numinlets" : 1, "fontsize" : 12.0, "numoutlets" : 3, "patching_rect" : [ 381.0, 331.0, 62.0, 20.0 ], "outlettype" : [ "bang", "bang", "" ], "id" : "obj-30", "fontname" : "Arial" } } , { "box" : { "maxclass" : "comment", "text" : "click here to close the serial port", "numinlets" : 1, "fontsize" : 12.0, "numoutlets" : 0, "patching_rect" : [ 429.0, 422.0, 206.0, 20.0 ], "id" : "obj-26", "fontname" : "Arial" } } , { "box" : { "maxclass" : "comment", "text" : "click here to open the serial port", "numinlets" : 1, "fontsize" : 12.0, "numoutlets" : 0, "patching_rect" : [ 454.0, 396.0, 206.0, 20.0 ], "id" : "obj-27", "fontname" : "Arial" } } , { "box" : { "maxclass" : "message", "text" : "close", "numinlets" : 2, "fontsize" : 12.0, "numoutlets" : 1, "patching_rect" : [ 381.0, 422.0, 39.0, 18.0 ], "outlettype" : [ "" ], "id" : "obj-21", "fontname" : "Arial" } } , { "box" : { "maxclass" : "message", "text" : "port a", "numinlets" : 2, "fontsize" : 12.0, "numoutlets" : 1, "patching_rect" : [ 403.0, 396.0, 41.0, 18.0 ], "outlettype" : [ "" ], "id" : "obj-19", "fontname" : "Arial" } } , { "box" : { "maxclass" : "comment", "text" : "Click here to get a list of serial ports", "numinlets" : 1, "fontsize" : 12.0, "numoutlets" : 0, "patching_rect" : [ 474.0, 370.0, 207.0, 20.0 ], "id" : "obj-2", "fontname" : "Arial" } } , { "box" : { "maxclass" : "toggle", "numinlets" : 1, "numoutlets" : 1, "patching_rect" : [ 381.0, 181.0, 21.0, 21.0 ], "outlettype" : [ "int" ], "id" : "obj-11" } } , { "box" : { "maxclass" : "message", "text" : "print", "numinlets" : 2, "fontsize" : 12.0, "numoutlets" : 1, "patching_rect" : [ 423.0, 370.0, 36.0, 18.0 ], "outlettype" : [ "" ], "id" : "obj-13", "fontname" : "Arial" } } , { "box" : { "maxclass" : "newobj", "text" : "serial a 9600", "numinlets" : 1, "fontsize" : 12.0, "numoutlets" : 2, "patching_rect" : [ 279.0, 461.0, 84.0, 20.0 ], "outlettype" : [ "int", "" ], "id" : "obj-14", "fontname" : "Arial" } } , { "box" : { "maxclass" : "comment", "text" : "Click to start", "numinlets" : 1, "fontsize" : 12.0, "numoutlets" : 0, "patching_rect" : [ 408.0, 181.0, 117.0, 20.0 ], "id" : "obj-17", "fontname" : "Arial" } } ], "lines" : [ { "patchline" : { "source" : [ "obj-11", 0 ], "destination" : [ "obj-30", 0 ], "hidden" : 0, "midpoints" : [ 390.5, 322.0, 390.5, 322.0 ] } } , { "patchline" : { "source" : [ "obj-30", 1 ], "destination" : [ "obj-19", 0 ], "hidden" : 0, "midpoints" : [ ] } } , { "patchline" : { "source" : [ "obj-30", 0 ], "destination" : [ "obj-21", 0 ], "hidden" : 0, "midpoints" : [ ] } } , { "patchline" : { "source" : [ "obj-21", 0 ], "destination" : [ "obj-14", 0 ], "hidden" : 0, "midpoints" : [ 390.5, 450.0, 288.5, 450.0 ] } } , { "patchline" : { "source" : [ "obj-19", 0 ], "destination" : [ "obj-14", 0 ], "hidden" : 0, "midpoints" : [ 412.5, 417.0, 288.5, 417.0 ] } } , { "patchline" : { "source" : [ "obj-13", 0 ], "destination" : [ "obj-14", 0 ], "hidden" : 0, "midpoints" : [ 432.5, 389.0, 367.0, 389.0, 367.0, 411.0, 288.5, 411.0 ] } } , { "patchline" : { "source" : [ "obj-23", 0 ], "destination" : [ "obj-25", 0 ], "hidden" : 0, "midpoints" : [ ] } } , { "patchline" : { "source" : [ "obj-25", 1 ], "destination" : [ "obj-32", 0 ], "hidden" : 0, "midpoints" : [ 310.0, 358.0, 338.5, 358.0 ] } } , { "patchline" : { "source" : [ "obj-25", 0 ], "destination" : [ "obj-31", 0 ], "hidden" : 0, "midpoints" : [ ] } } , { "patchline" : { "source" : [ "obj-31", 0 ], "destination" : [ "obj-33", 0 ], "hidden" : 0, "midpoints" : [ ] } } , { "patchline" : { "source" : [ "obj-32", 0 ], "destination" : [ "obj-33", 0 ], "hidden" : 0, "midpoints" : [ 338.5, 381.5, 288.5, 381.5 ] } } , { "patchline" : { "source" : [ "obj-33", 0 ], "destination" : [ "obj-14", 0 ], "hidden" : 0, "midpoints" : [ ] } } , { "patchline" : { "source" : [ "obj-37", 0 ], "destination" : [ "obj-25", 0 ], "hidden" : 0, "midpoints" : [ 83.5, 320.5, 288.5, 320.5 ] } } , { "patchline" : { "source" : [ "obj-39", 0 ], "destination" : [ "obj-37", 0 ], "hidden" : 0, "midpoints" : [ ] } } ] } }