{ "patcher" : { "fileversion" : 1, "rect" : [ 25.0, 69.0, 793.0, 559.0 ], "bglocked" : 0, "defrect" : [ 25.0, 69.0, 793.0, 559.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" : "Dimmer\n\nThis patch sends a binary number from 0 to 255 out the serial port to an Arduino connected to the port. It dims an LED attached to the Arduino.\n\ncreated 2006\nby David A. Mellis\nmodified 14 Apr 2009\nby Scott Fitzgerald and Tom Igoe", "linecount" : 10, "numinlets" : 1, "fontsize" : 12.0, "numoutlets" : 0, "patching_rect" : [ 209.0, 55.0, 344.0, 144.0 ], "id" : "obj-32", "fontname" : "Arial" } } , { "box" : { "maxclass" : "comment", "text" : "change the slider to alter the brightness of the LED", "linecount" : 3, "numinlets" : 1, "fontsize" : 12.0, "numoutlets" : 0, "patching_rect" : [ 90.0, 235.0, 117.0, 48.0 ], "id" : "obj-7", "fontname" : "Arial" } } , { "box" : { "maxclass" : "number", "numinlets" : 1, "fontsize" : 10.0, "numoutlets" : 2, "patching_rect" : [ 215.0, 385.0, 50.0, 19.0 ], "outlettype" : [ "int", "bang" ], "id" : "obj-6", "fontname" : "Verdana" } } , { "box" : { "maxclass" : "slider", "bgcolor" : [ 0.94902, 0.94902, 0.94902, 0.0 ], "numinlets" : 1, "numoutlets" : 1, "patching_rect" : [ 215.0, 235.0, 20.0, 140.0 ], "outlettype" : [ "" ], "id" : "obj-1", "size" : 256.0 } } , { "box" : { "maxclass" : "newobj", "text" : "select 0 1", "numinlets" : 1, "fontsize" : 12.0, "numoutlets" : 3, "patching_rect" : [ 342.0, 305.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" : [ 390.0, 396.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" : [ 415.0, 370.0, 206.0, 20.0 ], "id" : "obj-27", "fontname" : "Arial" } } , { "box" : { "maxclass" : "message", "text" : "close", "numinlets" : 2, "fontsize" : 12.0, "numoutlets" : 1, "patching_rect" : [ 342.0, 396.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" : [ 364.0, 370.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" : [ 435.0, 344.0, 207.0, 20.0 ], "id" : "obj-2", "fontname" : "Arial" } } , { "box" : { "maxclass" : "toggle", "numinlets" : 1, "numoutlets" : 1, "patching_rect" : [ 342.0, 268.0, 15.0, 15.0 ], "outlettype" : [ "int" ], "id" : "obj-11" } } , { "box" : { "maxclass" : "message", "text" : "print", "numinlets" : 2, "fontsize" : 12.0, "numoutlets" : 1, "patching_rect" : [ 384.0, 344.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" : [ 259.0, 420.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" : [ 369.0, 268.0, 117.0, 20.0 ], "id" : "obj-17", "fontname" : "Arial" } } , { "box" : { "maxclass" : "panel", "angle" : 270.0, "grad1" : [ 1.0, 1.0, 1.0, 1.0 ], "numinlets" : 1, "grad2" : [ 0.509804, 0.509804, 0.509804, 1.0 ], "mode" : 1, "numoutlets" : 0, "patching_rect" : [ 215.0, 235.0, 21.0, 139.0 ], "id" : "obj-8" } } ], "lines" : [ { "patchline" : { "source" : [ "obj-6", 0 ], "destination" : [ "obj-14", 0 ], "hidden" : 0, "midpoints" : [ 224.5, 411.5, 268.5, 411.5 ] } } , { "patchline" : { "source" : [ "obj-1", 0 ], "destination" : [ "obj-6", 0 ], "hidden" : 0, "midpoints" : [ ] } } , { "patchline" : { "source" : [ "obj-13", 0 ], "destination" : [ "obj-14", 0 ], "hidden" : 0, "midpoints" : [ 393.5, 365.5, 268.5, 365.5 ] } } , { "patchline" : { "source" : [ "obj-19", 0 ], "destination" : [ "obj-14", 0 ], "hidden" : 0, "midpoints" : [ 373.5, 393.5, 268.5, 393.5 ] } } , { "patchline" : { "source" : [ "obj-21", 0 ], "destination" : [ "obj-14", 0 ], "hidden" : 0, "midpoints" : [ 351.5, 416.5, 268.5, 416.5 ] } } , { "patchline" : { "source" : [ "obj-30", 0 ], "destination" : [ "obj-21", 0 ], "hidden" : 0, "midpoints" : [ ] } } , { "patchline" : { "source" : [ "obj-30", 1 ], "destination" : [ "obj-19", 0 ], "hidden" : 0, "midpoints" : [ ] } } , { "patchline" : { "source" : [ "obj-11", 0 ], "destination" : [ "obj-30", 0 ], "hidden" : 0, "midpoints" : [ 351.0, 296.0, 351.5, 296.0 ] } } ] } }