Knob patch:
{
"boxes" : [ {
"box" : {
"maxclass" : "gswitch2",
"outlettype" : [ "", "" ],
"id" : "obj-18",
"parameter_enable" : 0,
"numinlets" : 2,
"int" : 1,
"numoutlets" : 2,
"patching_rect" : [ 297.0, 782.329313993453979, 39.0, 32.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "itoa",
"outlettype" : [ "int" ],
"id" : "obj-3",
"numinlets" : 3,
"numoutlets" : 1,
"patching_rect" : [ 297.0, 661.0, 40.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "number",
"outlettype" : [ "", "bang" ],
"id" : "obj-4",
"parameter_enable" : 0,
"numinlets" : 1,
"numoutlets" : 2,
"patching_rect" : [ 375.5, 896.0, 50.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "fromsymbol",
"outlettype" : [ "" ],
"id" : "obj-17",
"numinlets" : 1,
"numoutlets" : 1,
"patching_rect" : [ 278.5, 726.0, 71.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "ctlout",
"id" : "obj-15",
"numinlets" : 3,
"numoutlets" : 0,
"patching_rect" : [ 282.5, 902.0, 40.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "scale 0 1 0 127",
"outlettype" : [ "" ],
"id" : "obj-14",
"numinlets" : 6,
"numoutlets" : 1,
"patching_rect" : [ 278.5, 830.0, 90.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "1",
"outlettype" : [ "" ],
"id" : "obj-13",
"numinlets" : 2,
"numoutlets" : 1,
"patching_rect" : [ 99.0, 749.0, 29.5, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "zl group 9600",
"outlettype" : [ "", "" ],
"id" : "obj-11",
"numinlets" : 2,
"numoutlets" : 2,
"patching_rect" : [ 297.0, 514.0, 81.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "sel 13 10",
"outlettype" : [ "bang", "bang", "" ],
"id" : "obj-10",
"numinlets" : 3,
"numoutlets" : 3,
"patching_rect" : [ 297.0, 446.0, 57.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "serial j 9600",
"outlettype" : [ "int", "" ],
"id" : "obj-9",
"numinlets" : 1,
"numoutlets" : 2,
"patching_rect" : [ 297.0, 380.0, 73.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "port b",
"outlettype" : [ "" ],
"id" : "obj-8",
"numinlets" : 2,
"numoutlets" : 1,
"patching_rect" : [ 407.0, 304.0, 39.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "print",
"outlettype" : [ "" ],
"id" : "obj-6",
"numinlets" : 2,
"numoutlets" : 1,
"patching_rect" : [ 231.0, 304.0, 32.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "sel 0",
"outlettype" : [ "bang", "" ],
"id" : "obj-5",
"numinlets" : 2,
"numoutlets" : 2,
"patching_rect" : [ 428.0, 221.0, 34.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "metro 100",
"outlettype" : [ "bang" ],
"id" : "obj-12",
"numinlets" : 2,
"numoutlets" : 1,
"patching_rect" : [ 282.0, 243.0, 63.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "toggle",
"outlettype" : [ "int" ],
"id" : "obj-16",
"parameter_enable" : 0,
"numinlets" : 1,
"numoutlets" : 1,
"patching_rect" : [ 281.0, 199.0, 24.0, 24.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "scale 0 1023 0 127",
"outlettype" : [ "" ],
"fontsize" : 13.0,
"fontname" : "Arial",
"id" : "obj-28",
"numinlets" : 6,
"numoutlets" : 1,
"patching_rect" : [ 892.348553419113159, 782.329313993453979, 118.0, 23.0 ]
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "3",
"outlettype" : [ "" ],
"id" : "obj-27",
"numinlets" : 2,
"numoutlets" : 1,
"patching_rect" : [ 959.598553419113159, 950.0, 29.5, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "unpack",
"outlettype" : [ "int", "int" ],
"id" : "obj-25",
"numinlets" : 1,
"numoutlets" : 2,
"patching_rect" : [ 778.348553419113159, 652.0, 47.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "scale 0 1023 0 127",
"outlettype" : [ "" ],
"fontsize" : 13.0,
"fontname" : "Arial",
"id" : "obj-20",
"numinlets" : 6,
"numoutlets" : 1,
"patching_rect" : [ 662.348553419113159, 786.742360353469849, 118.0, 23.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "ctlout",
"id" : "obj-2",
"numinlets" : 3,
"numoutlets" : 0,
"patching_rect" : [ 925.131152868270874, 1013.742360353469849, 40.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "ctlout",
"id" : "obj-1",
"numinlets" : 3,
"numoutlets" : 0,
"patching_rect" : [ 784.14351499080658, 1181.499977946281433, 40.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "fromsymbol",
"outlettype" : [ "" ],
"id" : "obj-53",
"numinlets" : 1,
"numoutlets" : 1,
"patching_rect" : [ 778.348553419113159, 612.5, 71.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "itoa",
"outlettype" : [ "int" ],
"id" : "obj-54",
"numinlets" : 3,
"numoutlets" : 1,
"patching_rect" : [ 778.348553419113159, 561.0, 40.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "zl group 100",
"outlettype" : [ "", "" ],
"id" : "obj-55",
"numinlets" : 2,
"numoutlets" : 2,
"patching_rect" : [ 778.348553419113159, 510.5, 75.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "sel 13 10",
"outlettype" : [ "bang", "bang", "" ],
"id" : "obj-56",
"numinlets" : 3,
"numoutlets" : 3,
"patching_rect" : [ 778.348553419113159, 462.5, 57.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "sel 0",
"outlettype" : [ "bang", "" ],
"id" : "obj-58",
"numinlets" : 2,
"numoutlets" : 2,
"patching_rect" : [ 892.348553419113159, 262.5, 34.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "metro 10",
"outlettype" : [ "bang" ],
"id" : "obj-59",
"numinlets" : 2,
"numoutlets" : 1,
"patching_rect" : [ 795.348553419113159, 262.5, 56.0, 22.0 ]
}
}
, {
"box" : {
"maxclass" : "toggle",
"outlettype" : [ "int" ],
"id" : "obj-60",
"parameter_enable" : 0,
"numinlets" : 1,
"numoutlets" : 1,
"patching_rect" : [ 818.848553419113159, 174.0, 25.5, 25.5 ]
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "port c",
"outlettype" : [ "" ],
"id" : "obj-61",
"numinlets" : 2,
"numoutlets" : 1,
"patching_rect" : [ 955.348553419113159, 328.5, 39.0, 22.0 ]
}
}
, {
"bo
Knob IDE:
int potValue = 0;
int potValueB = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
potValue = analogRead (A0);
potValueB = analogRead (A1);
Serial.print (potValue);
Serial.print (" ");
Serial.println (potValueB);
delay(10);
}
Comments
Post a Comment