diff --git a/GitHowTo.rtf b/GitHowTo.rtf deleted file mode 100644 index 4c9a58b..0000000 --- a/GitHowTo.rtf +++ /dev/null @@ -1,28 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf510 -{\fonttbl\f0\froman\fcharset0 Times-Roman;} -{\colortbl;\red255\green255\blue255;} -\margl1440\margr1440\vieww5980\viewh11900\viewkind0 -\deftab720 -\pard\pardeftab720 - -\f0\fs28 \cf0 I'll write it down so we can refer to this "how-to" in the future :-)\ -\ -Github is two things (1) an application on your mac, (2) a server on the web (were all the copies are synced)\ -\ -In order to get the most recent code, you need to follow these steps:\ -\ -A. Open the application on your mac\ -B. You will be presented with the interface - \'a0click "My Repositories" on the left bar menu\ -C. You will see a repo called "gauthiier/M-M-M" which you click on the arrow on the right.\ -D. This will bring you to the "Changes" mode of the repo (ilustrated on right bar).\ -E. Click on the "Sync Branch" on the top right of the repo window - this will fetch the code from the server.\ -F. If there is a problem fetching the code, this may be because you have un-commited code (code you worked on since we worked together). If this is the case, you simply need to commit your code by entering a "Commit summary" and by pressing the "Commit" button. After committing you can go to step E and "Sync Branch" again.\ -G. When the branch is in sync the code will be on your machine. To view which version you have, simply click on "History" button in the right bar. The most recent code I've committed is entitled "Update Motion library and added an example how-to in apps folder".\ -H. To view where the code is on your computer, go back to "Changes" (button in the right bar) and the folder where the repo is placed on your computer should be displayed in a list (below the "Select All" checkbox)\ -\ -Let me know if you are still experiencing problems (and we will skype).\ -\ -Hope you are well Bill, and sunshine in Menlo Park! (here it is snowing, which is very nice :-)\ -\ -Daviid\ -} \ No newline at end of file diff --git a/software/apps/M&MStudioBV/--ProcessingProfile/CirclesClick/CirclesClick.pde b/software/apps/M&MStudioBV/--ProcessingProfile/CirclesClick/CirclesClick.pde deleted file mode 100644 index a844331..0000000 --- a/software/apps/M&MStudioBV/--ProcessingProfile/CirclesClick/CirclesClick.pde +++ /dev/null @@ -1,22 +0,0 @@ - -// Click within the image to change -// the value of the rectangle - -int value = 20; - -void setup(){ - size(300,400); - stroke(value); - background(250); -} - -void draw(){ - value = mouseX; - fill(value); - stroke(value-100); -} - -void mouseReleased() { - ellipse(mouseX,mouseY,20,20); -} - diff --git a/software/apps/M&MStudioBV/--ProcessingProfile/DragBeads/DragBeads.pde b/software/apps/M&MStudioBV/--ProcessingProfile/DragBeads/DragBeads.pde deleted file mode 100644 index e446bf8..0000000 --- a/software/apps/M&MStudioBV/--ProcessingProfile/DragBeads/DragBeads.pde +++ /dev/null @@ -1,34 +0,0 @@ - -int[] altitude = { 10, 20, 30, 40, 50, 40, 30, 20, 10, 0 }; -int i; -int s = 80; - -void setup() { - size(800,100); -} -void draw(){ - background(200); - stroke(150); - line(0,50,799,50); - stroke(0); - - for (i = 0; i < 9; i = i+1) { - line(s*i,altitude[i],s*(i+1),altitude[i+1]); - } - - line(s*9, altitude[9], s*10-1, 50); - - for (i = 0; i < 9; i = i+1) { - ellipse(s*(i+1),altitude[i+1], 10, 10); - } - - if (mousePressed == true) { - int pos = (mouseX+40)/s; - altitude[pos]=mouseY; - } -} - -void mouseReleased() { - int pos = mouseX/s; - altitude[pos]=mouseY; -} diff --git a/software/apps/M&MStudioBV/--ProcessingProfile/Dragging/Dragging.pde b/software/apps/M&MStudioBV/--ProcessingProfile/Dragging/Dragging.pde deleted file mode 100644 index 99fcc54..0000000 --- a/software/apps/M&MStudioBV/--ProcessingProfile/Dragging/Dragging.pde +++ /dev/null @@ -1,59 +0,0 @@ -// two-dimensional array? -// i = 1, 8; -// int F[], // shown an height -// x[i], // - -// constrain x[i] sq(F[i]+100-mouseY)+sq(x[i]-mouseX)){ - ibest = i; - dist = sq(F[i]+100-mouseY)+sq(x[i]-mouseX); - } - } - ellipse(x[ibest],F[ibest]+100,20,20); - -text (Integer.toString(ibest), mouseX+10, mouseY-12); -text (Integer.toString(F[ibest]), mouseX+10, mouseY); -text (Integer.toString(x[ibest]), mouseX+10, mouseY+12); - - if (mousePressed == true){ - //now use ibest to move to mouseX, mouseY - x[ibest] = min(x[ibest+1],max(x[ibest-1],mouseX)); - F[ibest] = mouseY-100; - - } -} - - - diff --git a/software/apps/M&MStudioBV/--ProcessingProfile/DraggingFixedWidths/DraggingFixedWidths.pde b/software/apps/M&MStudioBV/--ProcessingProfile/DraggingFixedWidths/DraggingFixedWidths.pde deleted file mode 100644 index 79fe817..0000000 --- a/software/apps/M&MStudioBV/--ProcessingProfile/DraggingFixedWidths/DraggingFixedWidths.pde +++ /dev/null @@ -1,83 +0,0 @@ -// two-dimensional array? -// i = 1, 8; -// int F[], // shown an height -// x[i], // - -// constrain x[i] sq(F[i]+100-mouseY)+sq(x[i]-mouseX)){ - ibest = i; - dist = sq(F[i]+100-mouseY)+sq(x[i]-mouseX); - } - } - ellipse(x[ibest],F[ibest]+100,20,20); - -text (Integer.toString(ibest), mouseX+10, mouseY-12); -text (Integer.toString(F[ibest]), mouseX+10, mouseY); -text (Integer.toString(x[ibest]), mouseX+10, mouseY+12); - - if (mousePressed == true){ - //now use ibest to move to mouseX, mouseY - x[ibest] = min(x[ibest+1],max(x[ibest-1],mouseX)); - F[ibest] = mouseY-100; - - } - -//plot "terrain" assuming 80 point separation of F[]'s - pushMatrix(); - translate(0,height/2); - /*for (i = 0; i sq(F[i]+100-mouseY)+sq(x[i]-mouseX)){ - ibest = i; - dist = sq(F[i]+100-mouseY)+sq(x[i]-mouseX); - } - } - ellipse(x[ibest],F[ibest]+100,20,20); - -text (Integer.toString(ibest), mouseX+10, mouseY-12); -text (Integer.toString(F[ibest]), mouseX+10, mouseY); -text (Integer.toString(x[ibest]), mouseX+10, mouseY+12); - - if (mousePressed == true){ - //now use ibest to move to mouseX, mouseY - x[ibest] = min(x[ibest+1],max(x[ibest-1],mouseX)); - F[ibest] = mouseY-100; - - } - -//plot "terrain" assuming 80 point separation of F[]'s - pushMatrix(); - translate(0,height/2); - /*for (i = 0; i sq(F[i]+100-mouseY)+sq(x[i]-mouseX)){ - ibest = i; - dist = sq(F[i]+100-mouseY)+sq(x[i]-mouseX); - } - } - ellipse(x[ibest],F[ibest]+100,20,20); - -text (Integer.toString(ibest), mouseX+10, mouseY-12); -text (Integer.toString(F[ibest]), mouseX+10, mouseY); -text (Integer.toString(x[ibest]), mouseX+10, mouseY+12); - - if (mousePressed == true){ - //now use ibest to move to mouseX, mouseY - x[ibest] = min(x[ibest+1],max(x[ibest-1],mouseX)); - F[ibest] = mouseY - 100; - if (mouseY < 0) F[ibest] = -100; - if (mouseY > 200) F[ibest] = 100; - } - -//plot "terrain" assuming 80 point separation of F[]'s - pushMatrix(); - translate(0,height/2); - - top = 0; - FF = F[0]; - for (i = 0; i < n; i = i+1) { - s = x[i+1]-x[i]+1; // increment used for plotting - inc = 0.01*(F[i+1]-F[i])/s; - for (j = 0; j < s; j = j+1) { - FF = FF + inc; - top = top + FF; // j increments of inc = F diff. - line(x[i]+j,height,x[i]+j,top); - } - } - popMatrix(); -} - - - diff --git a/software/apps/M&MStudioBV/--ProcessingProfile/DraggingWidthsWorks/DraggingWidthsWorks.pde b/software/apps/M&MStudioBV/--ProcessingProfile/DraggingWidthsWorks/DraggingWidthsWorks.pde deleted file mode 100644 index 9d5efcb..0000000 --- a/software/apps/M&MStudioBV/--ProcessingProfile/DraggingWidthsWorks/DraggingWidthsWorks.pde +++ /dev/null @@ -1,91 +0,0 @@ -// two-dimensional array? -// i = 1, 8; -// int F[], // shown an height -// x[i], // - -// constrain x[i] sq(F[i]+100-mouseY)+sq(x[i]-mouseX)){ - ibest = i; - dist = sq(F[i]+100-mouseY)+sq(x[i]-mouseX); - } - } - ellipse(x[ibest],F[ibest]+100,20,20); - -text (Integer.toString(ibest), mouseX+10, mouseY-12); -text (Integer.toString(F[ibest]), mouseX+10, mouseY); -text (Integer.toString(x[ibest]), mouseX+10, mouseY+12); - - if (mousePressed == true){ - //now use ibest to move to mouseX, mouseY - x[ibest] = min(x[ibest+1],max(x[ibest-1],mouseX)); - F[ibest] = mouseY - 100; - if (mouseY < 0) F[ibest] = -100; - if (mouseY > 200) F[ibest] = 100; - } - -//plot "terrain" assuming 80 point separation of F[]'s - pushMatrix(); - translate(0,height/2); - - top = 0; - FF = F[0]; - for (i = 0; i < n; i = i+1) { - s = x[i+1]-x[i]+1; // increment used for plotting - inc = 0.01*(F[i+1]-F[i])/s; - for (j = 0; j < s; j = j+1) { - FF = FF + inc; - top = top + FF; // j increments of inc = F diff. - line(x[i]+j,height,x[i]+j,top); - } - } - popMatrix(); -} - -void keyPressed() { - if (key == CODED) { - if (keyCode == UP) --F[ibest]; - if (keyCode == DOWN) ++F[ibest]; - if (keyCode == RIGHT) ++x[ibest]; - if (keyCode == LEFT) --x[ibest]; - } -} - - diff --git a/software/apps/M&MStudioBV/--ProcessingProfile/InterpolationReady/InterpolationReady.pde b/software/apps/M&MStudioBV/--ProcessingProfile/InterpolationReady/InterpolationReady.pde deleted file mode 100644 index e89d1e1..0000000 --- a/software/apps/M&MStudioBV/--ProcessingProfile/InterpolationReady/InterpolationReady.pde +++ /dev/null @@ -1,50 +0,0 @@ -// Profile of forces and terrain - -int n = 10; //number of values of F calculated for each s -int s = 80; //number of samples for each n -int[] F = new int[11]; //course Force values -float[] FF = new float[800]; //fine Forces interpolated -int i,j; -//int s = 80; -//int n = 10; -int pos; - -void setup() { - size(800,200); // double height to see what interpolation looks like -} - - -void draw() { - background(200); - stroke(150); - line(0,50,n*s-1,50); - stroke(0); - - for (i = 0; i sq(F[i]+100-mouseY)+sq(x[i]-mouseX)){ - ibest = i; - dist = sq(F[i]+100-mouseY)+sq(x[i]-mouseX); - } - } - ellipse(x[ibest],F[ibest]+100,20,20); - -text (Integer.toString(ibest), mouseX+10, mouseY-12); -text (Integer.toString(F[ibest]), mouseX+10, mouseY); -text (Integer.toString(x[ibest]), mouseX+10, mouseY+12); - - if (mousePressed == true){ - //now use ibest to move to mouseX, mouseY - x[ibest] = min(x[ibest+1],max(x[ibest-1],mouseX)); - F[ibest] = mouseY - 100; - if (mouseY < 0) F[ibest] = -100; - if (mouseY > 200) F[ibest] = 100; - } - -//plot "terrain" assuming 80 point separation of F[]'s - pushMatrix(); - translate(0,height/2); - - top = 0; - FF = F[0]; - for (i = 0; i < n; i = i+1) { - s = x[i+1]-x[i]+1; // increment used for plotting - inc = 0.01*(F[i+1]-F[i])/s; - for (j = 0; j < s; j = j+1) { - FF = FF + inc; - top = top + FF; // j increments of inc = F diff. - line(x[i]+j,height,x[i]+j,top); - } - } - popMatrix(); - - //receive pos from Arduino -while (myPort.available() > 0) { - myString = myPort.readStringUntil(lf); - if (myString != null) { - myString = trim(myString); - pos = int(myString); - } - } - // draw pos cursor - stroke(150); - line(pos,200,pos,800); - -} - -void keyPressed() { - if (key == CODED) { - if (keyCode == UP) --F[ibest]; - if (keyCode == DOWN) ++F[ibest]; - if (keyCode == RIGHT) ++x[ibest]; - if (keyCode == LEFT) --x[ibest]; - } -} - - diff --git a/software/apps/M&MStudioBV/--ProcessingProfile/Profile/Profile/Profile.ino b/software/apps/M&MStudioBV/--ProcessingProfile/Profile/Profile/Profile.ino deleted file mode 100644 index 0690cec..0000000 --- a/software/apps/M&MStudioBV/--ProcessingProfile/Profile/Profile/Profile.ino +++ /dev/null @@ -1,10 +0,0 @@ -//(Arduino) Profile sends pos to (Processing) ProfileFx - -void setup(){ - Serial.begin(9600); -} - -void loop(){ - Serial.println(analogRead(A0)); - delay(100); -} diff --git a/software/apps/M&MStudioBV/--ProcessingProfile/Profile/ProfileFx/ProfileFx.pde b/software/apps/M&MStudioBV/--ProcessingProfile/Profile/ProfileFx/ProfileFx.pde deleted file mode 100644 index 9d5efcb..0000000 --- a/software/apps/M&MStudioBV/--ProcessingProfile/Profile/ProfileFx/ProfileFx.pde +++ /dev/null @@ -1,91 +0,0 @@ -// two-dimensional array? -// i = 1, 8; -// int F[], // shown an height -// x[i], // - -// constrain x[i] sq(F[i]+100-mouseY)+sq(x[i]-mouseX)){ - ibest = i; - dist = sq(F[i]+100-mouseY)+sq(x[i]-mouseX); - } - } - ellipse(x[ibest],F[ibest]+100,20,20); - -text (Integer.toString(ibest), mouseX+10, mouseY-12); -text (Integer.toString(F[ibest]), mouseX+10, mouseY); -text (Integer.toString(x[ibest]), mouseX+10, mouseY+12); - - if (mousePressed == true){ - //now use ibest to move to mouseX, mouseY - x[ibest] = min(x[ibest+1],max(x[ibest-1],mouseX)); - F[ibest] = mouseY - 100; - if (mouseY < 0) F[ibest] = -100; - if (mouseY > 200) F[ibest] = 100; - } - -//plot "terrain" assuming 80 point separation of F[]'s - pushMatrix(); - translate(0,height/2); - - top = 0; - FF = F[0]; - for (i = 0; i < n; i = i+1) { - s = x[i+1]-x[i]+1; // increment used for plotting - inc = 0.01*(F[i+1]-F[i])/s; - for (j = 0; j < s; j = j+1) { - FF = FF + inc; - top = top + FF; // j increments of inc = F diff. - line(x[i]+j,height,x[i]+j,top); - } - } - popMatrix(); -} - -void keyPressed() { - if (key == CODED) { - if (keyCode == UP) --F[ibest]; - if (keyCode == DOWN) ++F[ibest]; - if (keyCode == RIGHT) ++x[ibest]; - if (keyCode == LEFT) --x[ibest]; - } -} - - diff --git a/software/apps/M&MStudioBV/--ProcessingProfile/ProfileFixedWidths/ProfileFixedWidths.pde b/software/apps/M&MStudioBV/--ProcessingProfile/ProfileFixedWidths/ProfileFixedWidths.pde deleted file mode 100644 index 16fca5b..0000000 --- a/software/apps/M&MStudioBV/--ProcessingProfile/ProfileFixedWidths/ProfileFixedWidths.pde +++ /dev/null @@ -1,82 +0,0 @@ -// Profile of forces and terrain - -int n = 10; //number of values of F calculated for each s -int s = 80; //number of samples for each n -int[] F = new int[11]; // Force values [-512 to +511] scaled for plot? -float FF; // forces interpolated -float top; // terrain value (integral of forces) -float inc; // interpolated slope ( F[i+1] - F[i] ) / s -int i,j; -int pos; -int vt = 50; //vertical translation for force curve - - - -void setup() { - size(800,800); // double height to see what interpolation looks like - for(i=0;i sq(F[i]-mouseY)+sq(x[i]-mouseX)){ - ibest = i; - dist = sq(F[i]-mouseY)+sq(x[i]-mouseX); - } - } - ellipse(x[ibest],F[ibest],20,20); - // } - - if (mousePressed == true){ - //now use ibest to move to mouseX, mouseY - F[ibest] = mouseY; - x[ibest] = min(x[ibest+1],mouseX); - x[ibest] = max(x[ibest-1],mouseX); - } - -} - - - diff --git a/software/apps/M&MStudioBV/-Studio/Pulse_Beat_A/Pulse_Beat_A.ino b/software/apps/M&MStudioBV/-Studio/Pulse_Beat_A/Pulse_Beat_A.ino deleted file mode 100644 index 9864ddc..0000000 --- a/software/apps/M&MStudioBV/-Studio/Pulse_Beat_A/Pulse_Beat_A.ino +++ /dev/null @@ -1,36 +0,0 @@ -//"Pulse" - small duration positive then negative force -// parameters: F1, T1, D1, F2, T2, D2 -// pitch set from slider (B - A3) - -#define BIT_DEPTH 12 - -#include -#include - -void setup(){ - MotorA.init(); - Music.init(); - - Music.setWaveform(SINE); - Music.enableEnvelope(); - Music.setAttack(10); - Music.setDecay(10); - Music.setRelease(10); -} - -void loop(){ - //for (int i; i < 512; i + 100){ - MotorA.torque(80); - Music.noteOn(map(analogRead(A3),0,1023,30,60)); - delay (40); - Music.noteOff(); - MotorA.torque(0); - delay (150); - MotorA.torque(-70); - Music.noteOn(map(analogRead(A3),0,1023,35,65)); - delay (40); - Music.noteOff(); - MotorA.torque(0); - delay (750); - //} -} diff --git a/software/apps/M&MStudioBV/ABSlaveMusic/ABSlaveMusic.ino b/software/apps/M&MStudioBV/ABSlaveMusic/ABSlaveMusic.ino deleted file mode 100644 index ad9ef81..0000000 --- a/software/apps/M&MStudioBV/ABSlaveMusic/ABSlaveMusic.ino +++ /dev/null @@ -1,27 +0,0 @@ -// CenterAB - both motors -// CenterA at xB, CenterB at xA? -// feels like "Slave" - -#include -#include - -int duty, count, fout; -int xA, xB, foutA, foutB; - -void setup(){ - MotorA.init(); - MotorB.init(); - Music.init(); -} - -void loop(){ - xA = analogRead(A0); - xB = analogRead(A3); - - foutA = 2*(xB-xA); - MotorA.torque(foutA); - - foutB = 2*(xA-xB); // this will peak at x=1024/6 - MotorB.torque(foutB); // 1/4 or 1/2 ? - -} diff --git a/software/apps/M&MStudioBV/ABslave/ABslave.ino b/software/apps/M&MStudioBV/ABslave/ABslave.ino deleted file mode 100644 index ea396cb..0000000 --- a/software/apps/M&MStudioBV/ABslave/ABslave.ino +++ /dev/null @@ -1,43 +0,0 @@ -// CenterAB - both motors - -//CenterA at xB, CenterB at xA? -//feels like "Double Toggle" -//position on A0, pwm:D9, dir:D8,D7 -//CenterB -//position on A3, pwm:D10, dir:D11,D12 - - -#include - -int duty, count, fout; -int xA, xB, foutA, foutB; - -void setup(){ - Serial.begin(9600); - MotorA.init(); - MotorB.init(); -} - -void loop(){ - - xA = analogRead(A0); - xB = analogRead(A3); - foutA = 6*(xA-xB); // this will peak at x=1024/6 - MotorA.torque(foutA); // 1/4 or 1/2 ? - - foutB = 6*(xB-xA); // this will peak at x=1024/6 - MotorB.torque(foutB); // 1/4 or 1/2 ? - - // print every 1000 cycles - if(count++>=0){ - count=-500; - Serial.print(xA,DEC); - Serial.print(" "); - Serial.print(foutA,DEC); - Serial.print(" "); - Serial.print(xB,DEC); - Serial.print(" "); - Serial.println(foutB,DEC); - } - -} diff --git a/software/apps/M&MStudioBV/CenterABM/CenterABM.ino b/software/apps/M&MStudioBV/CenterABM/CenterABM.ino deleted file mode 100644 index 08112bc..0000000 --- a/software/apps/M&MStudioBV/CenterABM/CenterABM.ino +++ /dev/null @@ -1,42 +0,0 @@ -// CenterAB - both motors - -//CenterA -//position on A0, pwm:D9, dir:D8,D7 -//CenterB -//position on A3, pwm:D10, dir:D11,D12 - - -#include - -int duty, count, fout; -int xA, xB, foutA, foutB; - -void setup(){ - Serial.begin(9600); - MotorA.init(); - MotorB.init(); -} - -void loop(){ - - xA = analogRead(A0); - foutA = 2*(512 - xA); // this will peak at x=1024/2 - MotorA.torque(foutA); // 1/4 or 1/2 ? - - xB = analogRead(A3); - foutB = (512 - xB); // this will peak at x=1024/6 - MotorB.torque(foutB); // 1/4 or 1/2 ? - - // print every 1000 cycles - if(count++>=0){ - count=-1000; - Serial.print(xA,DEC); - Serial.print(" "); - Serial.print(foutA,DEC); - Serial.print(" "); - Serial.print(xB,DEC); - Serial.print(" "); - Serial.println(foutB,DEC); - } - -} diff --git a/software/apps/M&MStudioBV/FSR/Bumps4FSR/Bumps4FSR.ino b/software/apps/M&MStudioBV/FSR/Bumps4FSR/Bumps4FSR.ino deleted file mode 100644 index 7d3b9d3..0000000 --- a/software/apps/M&MStudioBV/FSR/Bumps4FSR/Bumps4FSR.ino +++ /dev/null @@ -1,97 +0,0 @@ -//plucks - four bumps -//three notes (400,500,600hz) -//can't get Music.setGain1, etc to work only Music.setGain() starts all of them. -//requires FSR attached to A - -#define NUM_OSCILLATORS 3 -#define BIT_DEPTH 8 - -#include -#include - -int x, xold, xt; // input position x, output force F -float K = 20; // slope constant -byte count; //for print count-down -float fin; // scaled to be 0.0 - 1.0 -float fout; // from FSR - -void setup(){ - Music.init(); - Music.setFrequency1(200); - Music.setFrequency2(250); - Music.setFrequency3(300); - - //FSR-A - pinMode(A1,INPUT); - digitalWrite(A1,HIGH); //set pull-up - pinMode(4,OUTPUT); - digitalWrite(4,LOW); - //FSR-B - pinMode(A4,INPUT); - digitalWrite(A4,HIGH); //set pull-up - pinMode(5,OUTPUT); - digitalWrite(5,LOW); - - Serial.begin(9600); - - MotorA.init(); - - Serial.begin(9600); - x = analogRead(A0); // initialize x -} - -void loop(){ - xold = x; - x = analogRead(A0); - -// did xold - x include 125, 375, 625, 875? or x%250 = 125 - -if (((xold <= 125) && (x > 125)) || ((xold >= 125) && (x < 125))){ - Music.setGain1(fin*fin); - Music.setFrequency1(200); -} -if (((xold <= 375) && (x > 375)) || ((xold >= 375) && (x < 375))){ - Music.setGain2(fin*fin); - //Music.setFrequency(250); -} -if (((xold <= 625) && (x > 625)) || ((xold >= 625) && (x < 625))){ - Music.setGain3(fin*fin); - //Music.setFrequency(300); -} -if (((xold <= 875) && (x > 875)) || ((xold >= 875) && (x < 875))){ - Music.setGain1(fin*fin); - Music.setFrequency1(400); - } - else{ - Music.setGain1(0.995f*Music.getGain1()); - Music.setGain2(0.995f*Music.getGain2()); - Music.setGain3(0.995f*Music.getGain3()); - } - fin = 1000 - analogRead(A1); // invert and shift - fin = max (0, fin); // make sure it's > 0 - fin = min (1023, fin); // and < 1023 - fin = fin/1000; // scale 0-1.0 - fin = fin*fin; //square it for more effect near 1.0. - xt = x % 250; //same force for each 250 ranage - fout = 0; - if (xt > 60) fout = - K * (xt - 60); - if (xt > 80) fout = - K * (100 - xt); - if (xt > 120) fout = K * (140 - xt); - if (xt > 140) fout = 0; - fout = fout * fin; - MotorA.torque(fout); - - - // print every 256 cycles - if(count++==0){ - Serial.print(x); - Serial.print(" "); - Serial.print(xt); - Serial.print(" "); - Serial.print(fin); - Serial.print(" "); - Serial.println(fout); - } - -} - diff --git a/software/apps/M&MStudioBV/FSR/Bumps4FSRaltered/Bumps4FSRaltered.ino b/software/apps/M&MStudioBV/FSR/Bumps4FSRaltered/Bumps4FSRaltered.ino deleted file mode 100644 index 5c3b6e3..0000000 --- a/software/apps/M&MStudioBV/FSR/Bumps4FSRaltered/Bumps4FSRaltered.ino +++ /dev/null @@ -1,98 +0,0 @@ -//plucks - four bumps -//three notes (400,500,600hz) -//can't get Music.setGain1, etc to work only Music.setGain() starts all of them. -//requires FSR attached to A - -#define NUM_OSCILLATORS 3 -#define BIT_DEPTH 8 - -#include -#include - -int x, xold, xt; // input position x, output force F -float K = 20; // slope constant -byte count; //for print count-down -float fin; // scaled to be 0.0 - 1.0 -float fout; // from FSR - -void setup(){ - Music.init(); - Music.setFrequency1(200); - Music.setFrequency2(250); - Music.setFrequency3(300); - - //FSR-A - pinMode(A1,INPUT); - digitalWrite(A1,HIGH); //set pull-up - pinMode(4,OUTPUT); - digitalWrite(4,LOW); - //FSR-B - pinMode(A4,INPUT); - digitalWrite(A4,HIGH); //set pull-up - pinMode(5,OUTPUT); - digitalWrite(5,LOW); - - Serial.begin(9600); - - MotorA.init(); - - Serial.begin(9600); - x = analogRead(A0); // initialize x -} - -void loop(){ - xold = x; - x = analogRead(A0); - -// did xold - x include 125, 375, 625, 875? or x%250 = 125 - -if (((xold <= 125) && (x > 125)) || ((xold >= 125) && (x < 125))){ - Music.setGain1(1.0);//Music.setGain1(fin*fin); - Music.setFrequency1(200); -} -if (((xold <= 375) && (x > 375)) || ((xold >= 375) && (x < 375))){ - Music.setGain2(1.0);//Music.setGain2(fin*fin); - //Music.setFrequency(250); -} -if (((xold <= 625) && (x > 625)) || ((xold >= 625) && (x < 625))){ - Music.setGain3(1.0);//Music.setGain3(fin*fin); - //Music.setFrequency(300); -} -if (((xold <= 875) && (x > 875)) || ((xold >= 875) && (x < 875))){ - Music.setGain1(1.0);//Music.setGain1(fin*fin); - Music.setFrequency1(400); - } - else{ - Music.setGain1(0.995f*Music.getGain1()); - Music.setGain2(0.995f*Music.getGain2()); - Music.setGain3(0.995f*Music.getGain3()); - } - fin = 1000 - analogRead(A1); // invert and shift - fin = max (0, fin); // make sure it's > 0 - fin = min (1023, fin); // and < 1023 - fin = fin/1000; // scale 0-1.0 - fin = fin*fin; //square it for more effect near 1.0. - xt = x % 250; //same force for each 250 ranage - fout = 0; - if (xt > 60) fout = - K * (xt - 60); - if (xt > 80) fout = - K * (100 - xt); - if (xt > 120) fout = K * (140 - xt); - if (xt > 140) fout = 0; -//fout = fout * fin; - fout = fout; - MotorA.torque(fout); - - - // print every 256 cycles - if(count++==0){ - Serial.print(x); - Serial.print(" "); - Serial.print(xt); - Serial.print(" "); - Serial.print(fin); - Serial.print(" "); - Serial.println(fout); - } - -} - diff --git a/software/apps/M&MStudioBV/FSR/FSR_AB_center/FSR_AB_center.ino b/software/apps/M&MStudioBV/FSR/FSR_AB_center/FSR_AB_center.ino deleted file mode 100644 index ad1e1b1..0000000 --- a/software/apps/M&MStudioBV/FSR/FSR_AB_center/FSR_AB_center.ino +++ /dev/null @@ -1,37 +0,0 @@ -// FSR A and B -// stick-slip - -#include -int xA, finA, foutA; //fout gets too big if fout=fin*x; -float x, fin, fout; -byte c; - -void setup(){ - //FSR-A - pinMode(A1,INPUT); - digitalWrite(A1,HIGH); //set pull-up - pinMode(4,OUTPUT); - digitalWrite(4,LOW); - //FSR-B - pinMode(A4,INPUT); - digitalWrite(A4,HIGH); //set pull-up - pinMode(5,OUTPUT); - digitalWrite(5,LOW); - - //Motors - MotorA.init(); - MotorB.init(); - - Serial.begin(9600); -} -void loop(){ - x = 512 - analogRead(A0); //in:[0,1023] out: [-512,511] - fin = 1024 - analogRead(A1); //in:[1023,0] out [0,1023] - fout = x*fin/500; - MotorA.torque(fout); - - x = 512 - analogRead(A3); //in:[0,1023] out: [-512,511] - fin = 1024 - analogRead(A4); //in:[1023,0] out [0,1023] - fout = x*fin/500; - MotorB.torque(fout); -} diff --git a/software/apps/M&MStudioBV/FSR/FSR_AB_test/FSR_AB_test.ino b/software/apps/M&MStudioBV/FSR/FSR_AB_test/FSR_AB_test.ino deleted file mode 100644 index ededaf5..0000000 --- a/software/apps/M&MStudioBV/FSR/FSR_AB_test/FSR_AB_test.ino +++ /dev/null @@ -1,20 +0,0 @@ -// FSR A and B test -void setup(){ - //FSR-A - pinMode(A1,INPUT); - digitalWrite(A1,HIGH); //set pull-up - pinMode(4,OUTPUT); - digitalWrite(4,LOW); - //FSR-B - pinMode(A4,INPUT); - digitalWrite(A4,HIGH); //set pull-up - pinMode(5,OUTPUT); - digitalWrite(5,LOW); - - Serial.begin(9600); -} -void loop(){ - Serial.print(analogRead(A1)); - Serial.print(" "); - Serial.println(analogRead(A4)); -} diff --git a/software/apps/M&MStudioBV/FSR/FSR_D4_OUTPUT/FSR_D4_OUTPUT.ino b/software/apps/M&MStudioBV/FSR/FSR_D4_OUTPUT/FSR_D4_OUTPUT.ino deleted file mode 100644 index 52ba259..0000000 --- a/software/apps/M&MStudioBV/FSR/FSR_D4_OUTPUT/FSR_D4_OUTPUT.ino +++ /dev/null @@ -1,17 +0,0 @@ -void setup(){ - pinMode(A1,INPUT); - pinMode(4,OUTPUT); - digitalWrite(4,LOW); //sets ground - digitalWrite(A1,HIGH); //sets pull-up -} -void loop(){ - digitalWrite(A1,LOW); - digitalWrite(4,HIGH); - delay(1000); - digitalWrite(A1,HIGH); - digitalWrite(4,LOW); - delay(1000); -} - -//does D4 actually go 5v to GND? -//yes, if D4 is OUTPUT. diff --git a/software/apps/M&MStudioBV/FSR/HumpFSR_A/HumpFSR_A.ino b/software/apps/M&MStudioBV/FSR/HumpFSR_A/HumpFSR_A.ino deleted file mode 100644 index 9e71054..0000000 --- a/software/apps/M&MStudioBV/FSR/HumpFSR_A/HumpFSR_A.ino +++ /dev/null @@ -1,36 +0,0 @@ -//HumpFSR-A -//same as CenterFSR-A with sign reversal -//position on A0, pwm:D9, dir:D8,D7 -//FSR on A1 and D4 - -// BUZZ! (float vs int?) -#include "Motor.h" - -int x, duty, fin; -float fout; -byte count; // used as counter - -void setup(){ - Serial.begin(9600); - MotorA.init(); - //for FSR - pinMode(A1,INPUT); - digitalWrite(A1,HIGH); - pinMode(4,OUTPUT); - digitalWrite(4,LOW); -} - -void loop(){ - fin = 1024 - analogRead(A1); - x = analogRead(A0)-512; - fout = .004*(float(fin)*float(x)); - duty = min(1023,fout); - MotorA.torque(fout); - if(count++ == 0){ - Serial.print(x,DEC); - Serial.print(" "); - Serial.print(fin,DEC); - Serial.print(" "); - Serial.println(fout,DEC); - } -} diff --git a/software/apps/M&MStudioBV/FSR/SandFSR_A/SandFSR_A.ino b/software/apps/M&MStudioBV/FSR/SandFSR_A/SandFSR_A.ino deleted file mode 100644 index 15ade1c..0000000 --- a/software/apps/M&MStudioBV/FSR/SandFSR_A/SandFSR_A.ino +++ /dev/null @@ -1,33 +0,0 @@ -#include "Motor.h" - -int x; //position -float fin; //from hall-sensor [ wired GND to A1 ] -float fout; //force -int duty; // max 1024 -byte c; // counter to send data every 256 cycles - -void setup(){ - MotorA.init(); - pinMode(A1,INPUT); //used for FSR [A1 to D4] - pinMode(4,OUTPUT); //used for FSR as GND - digitalWrite(A1,HIGH); //enable pull-up resistor - digitalWrite(4,LOW); //GND for FSR - //TimerOne - Serial.begin(9600); -} - -void loop(){ - fin = analogRead(A1) - 1000; - //fout = random(fin); - fout = 2*fin + random(fin); // range [0,4096]; - fout = fout/3; - MotorA.torque(fout); - // Timer1.pwm(9,duty); //output force - - if(c++==0){ - Serial.print(fin); - Serial.print(" "); - Serial.println(fout); - } -} - diff --git a/software/apps/M&MStudioBV/Gran/GongRoarCockShort.wav b/software/apps/M&MStudioBV/Gran/GongRoarCockShort.wav deleted file mode 100644 index a8b4954..0000000 Binary files a/software/apps/M&MStudioBV/Gran/GongRoarCockShort.wav and /dev/null differ diff --git a/software/apps/M&MStudioBV/Gran/GranFlash.rtf b/software/apps/M&MStudioBV/Gran/GranFlash.rtf deleted file mode 100644 index 7bdb2c1..0000000 --- a/software/apps/M&MStudioBV/Gran/GranFlash.rtf +++ /dev/null @@ -1,13 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf510 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\margl1440\margr1440\vieww10800\viewh8400\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural - -\f0\fs24 \cf0 32K flash program memory 8-bit bytes\ -8K/sec = 4 seconds\ -\ -use 20K ?\ -\ -granular synthesis is like wave-table synthesis but with playing only a selection and windowing it\ -the stored wave-table could be a piece of bird-call and you could play a piece by feeling it - i.e. create a "haptic-landscape" that let's you feel what part of the wave you are on.} \ No newline at end of file diff --git a/software/apps/M&MStudioBV/Pulse/Pulse.ino b/software/apps/M&MStudioBV/Pulse/Pulse.ino deleted file mode 100644 index 1df2328..0000000 --- a/software/apps/M&MStudioBV/Pulse/Pulse.ino +++ /dev/null @@ -1,20 +0,0 @@ -//"Pulse" - small duration positive then negative force -// parameters: F1, T1, D1, F2, T2, D2 -#include - -void setup(){ - MotorB.init(); -} - -void loop(){ - //for (int i; i < 512; i + 100){ - MotorB.torque(10); - delay (20); - MotorB.torque(0); - delay (150); - MotorB.torque(-50); - delay (40); - MotorB.torque(0); - delay (750); - //} -} diff --git a/software/apps/M&MStudioBV/Pulse_Beat_B/Pulse_Beat_B.ino b/software/apps/M&MStudioBV/Pulse_Beat_B/Pulse_Beat_B.ino deleted file mode 100644 index 6f051ca..0000000 --- a/software/apps/M&MStudioBV/Pulse_Beat_B/Pulse_Beat_B.ino +++ /dev/null @@ -1,35 +0,0 @@ -//"Pulse" - small duration positive then negative force -// parameters: F1, T1, D1, F2, T2, D2 - -#define BIT_DEPTH 12 - -#include -#include - -void setup(){ - MotorB.init(); - Music.init(); - - Music.setWaveform(SINE); - Music.enableEnvelope(); - Music.setAttack(10); - Music.setDecay(10); - Music.setRelease(10); -} - -void loop(){ - //for (int i; i < 512; i + 100){ - MotorB.torque(40); - Music.noteOn(map(analogRead(A3),0,1023,30,60)); - delay (20); - Music.noteOff(); - MotorB.torque(0); - delay (150); - MotorB.torque(-70); - Music.noteOn(map(analogRead(A3),0,1023,35,65)); - delay (40); - Music.noteOff(); - MotorB.torque(0); - delay (750); - //} -} diff --git a/software/apps/M&MStudioBV/ReadA0A1/ReadA0A1.ino b/software/apps/M&MStudioBV/ReadA0A1/ReadA0A1.ino deleted file mode 100644 index 6b9ccaa..0000000 --- a/software/apps/M&MStudioBV/ReadA0A1/ReadA0A1.ino +++ /dev/null @@ -1,17 +0,0 @@ -//read position A0 FSR A1 - -void setup(){ - Serial.begin(9600); - pinMode(A0,INPUT); - //for FSR - pinMode(A1,INPUT); - digitalWrite(A1,HIGH); - pinMode(4,OUTPUT); - digitalWrite(4,LOW); -} - -void loop(){ - Serial.print(analogRead(A0)); - Serial.print(" "); - Serial.println(analogRead(A1)); -} diff --git a/software/apps/M&MStudioBV/SliderTest/SliderTest.ino b/software/apps/M&MStudioBV/SliderTest/SliderTest.ino deleted file mode 100644 index a84a0d6..0000000 --- a/software/apps/M&MStudioBV/SliderTest/SliderTest.ino +++ /dev/null @@ -1,11 +0,0 @@ -//slider test -#include -void setup(){ - Serial.begin(9600); - MotorA.init(); -} -void loop(){ - MotorA.torque(analogRead(A0)); - Serial.println(analogRead(A0)); -} - diff --git a/software/apps/M&MStudioBV/fscale.rtf b/software/apps/M&MStudioBV/fscale.rtf deleted file mode 100644 index b00bc3f..0000000 --- a/software/apps/M&MStudioBV/fscale.rtf +++ /dev/null @@ -1,148 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf510 -{\fonttbl\f0\fmodern\fcharset0 Courier;} -{\colortbl;\red255\green255\blue255;} -\margl1440\margr1440\vieww10800\viewh8400\viewkind0 -\deftab720 -\pard\pardeftab720 - -\f0\fs24 \cf0 /* fscale\ - Floating Point Autoscale Function V0.1\ - Paul Badger 2007\ - Modified from code by Greg Shakar\ -\ - This function will scale one set of floating point numbers (range) to another set of floating point numbers (range)\ - It has a "curve" parameter so that it can be made to favor either the end of the output. (Logarithmic mapping)\ -\ - It takes 6 parameters\ -\ - originalMin - the minimum value of the original range - this MUST be less than origninalMax\ - originalMax - the maximum value of the original range - this MUST be greater than orginalMin\ -\ - newBegin - the end of the new range which maps to orginalMin - it can be smaller, or larger, than newEnd, to facilitate inverting the ranges\ - newEnd - the end of the new range which maps to originalMax - it can be larger, or smaller, than newBegin, to facilitate inverting the ranges\ -\ - inputValue - the variable for input that will mapped to the given ranges, this variable is constrained to originaMin <= inputValue <= originalMax\ - curve - curve is the curve which can be made to favor either end of the output scale in the mapping. Parameters are from -10 to 10 with 0 being\ - a linear mapping (which basically takes curve out of the equation)\ -\ - To understand the curve parameter do something like this: \ -\ - void loop()\{\ - for ( j=0; j < 200; j++)\{\ - scaledResult = fscale( 0, 200, 0, 200, j, -1.5);\ -\ - Serial.print(j, DEC); \ - Serial.print(" "); \ - Serial.println(scaledResult, DEC); \ - \} \ -\}\ -\ -And try some different values for the curve function - remember 0 is a neutral, linear mapping\ -\ -To understand the inverting ranges, do something like this:\ -\ - void loop()\{\ - for ( j=0; j < 200; j++)\{\ - scaledResult = fscale( 0, 200, 200, 0, j, 0);\ -\ - // Serial.print lines as above\ -\ - \} \ -\}\ -\ -*/\ -\ -\ -#include \ -\ -int j;\ -float scaledResult; \ -\ -void setup() \{\ - Serial.begin(9600);\ -\}\ -\ -void loop()\{\ - for ( j=0; j < 200; j++)\{\ - scaledResult = fscale( 0, 200, 0, 200, j, -1.5);\ -\ - Serial.print(j, DEC); \ - Serial.print(" "); \ - Serial.println(scaledResult , DEC); \ - \} \ -\}\ -\ -float fscale( float originalMin, float originalMax, float newBegin, float\ -newEnd, float inputValue, float curve)\{\ -\ - float OriginalRange = 0;\ - float NewRange = 0;\ - float zeroRefCurVal = 0;\ - float normalizedCurVal = 0;\ - float rangedValue = 0;\ - boolean invFlag = 0;\ -\ -\ - // condition curve parameter\ - // limit range\ -\ - if (curve > 10) curve = 10;\ - if (curve < -10) curve = -10;\ -\ - curve = (curve * -.1) ; // - invert and scale - this seems more intuitive - postive numbers give more weight to high end on output \ - curve = pow(10, curve); // convert linear scale into lograthimic exponent for other pow function\ -\ - /*\ - Serial.println(curve * 100, DEC); // multply by 100 to preserve resolution \ - Serial.println(); \ - */\ -\ - // Check for out of range inputValues\ - if (inputValue < originalMin) \{\ - inputValue = originalMin;\ - \}\ - if (inputValue > originalMax) \{\ - inputValue = originalMax;\ - \}\ -\ - // Zero Refference the values\ - OriginalRange = originalMax - originalMin;\ -\ - if (newEnd > newBegin)\{ \ - NewRange = newEnd - newBegin;\ - \}\ - else\ - \{\ - NewRange = newBegin - newEnd; \ - invFlag = 1;\ - \}\ -\ - zeroRefCurVal = inputValue - originalMin;\ - normalizedCurVal = zeroRefCurVal / OriginalRange; // normalize to 0 - 1 float\ -\ - /*\ - Serial.print(OriginalRange, DEC); \ - Serial.print(" "); \ - Serial.print(NewRange, DEC); \ - Serial.print(" "); \ - Serial.println(zeroRefCurVal, DEC); \ - Serial.println(); \ - */\ -\ - // Check for originalMin > originalMax - the math for all other cases i.e. negative numbers seems to work out fine \ - if (originalMin > originalMax ) \{\ - return 0;\ - \}\ -\ - if (invFlag == 0)\{\ - rangedValue = (pow(normalizedCurVal, curve) * NewRange) + newBegin;\ -\ - \}\ - else // invert the ranges\ - \{ \ - rangedValue = newBegin - (pow(normalizedCurVal, curve) * NewRange); \ - \}\ -\ - return rangedValue;\ -\}\ -} \ No newline at end of file diff --git a/software/apps/M&MStudioBV/motortestM/motortestM.ino b/software/apps/M&MStudioBV/motortestM/motortestM.ino deleted file mode 100644 index 9c97c80..0000000 --- a/software/apps/M&MStudioBV/motortestM/motortestM.ino +++ /dev/null @@ -1,22 +0,0 @@ -//motortest -//.5 sec forward, .5 sec back - -#include - -void setup() -{ - MotorA.init(); - MotorB.init(); - MotorA.torque(40); // small force for Plank - MotorB.torque(200); // need 200 for Fader -} - -void loop() -{ - MotorA.direction(FORWARD); - MotorB.direction(FORWARD); - delay(500); - MotorA.direction(BACKWARD); - MotorB.direction(BACKWARD); - delay(500); -} diff --git a/software/apps/M&MStudioBV/plotOsc/plotOsc.pde b/software/apps/M&MStudioBV/plotOsc/plotOsc.pde deleted file mode 100644 index fd67978..0000000 --- a/software/apps/M&MStudioBV/plotOsc/plotOsc.pde +++ /dev/null @@ -1,27 +0,0 @@ -// step response of second order system -// m mass, k spring, b damping - -float xPos = 0.0; -float yPos = 0.0; -float xVel = 0.0; -float T = 0.1; -float koverm = 0.1; -float boverm = 0.01; - -int x, y; // variables at mouse- and screen-resolution - -void setup() { // setup() runs once - size(800, 500); - frameRate(30); -} - -void draw() { // draw() loops forever, until stopped - xPos = width/2; - xVel = 0.0; -background(204); - for(int y=0; y < height; y = y +1) { - xVel += koverm * (mouseX - xPos) * T - boverm * xVel; //a=F/m - xPos += xVel * T; - point(xPos, y); - } -} diff --git a/software/apps/M&MStudioBV/ABSlaveMusicWarble/ABSlaveMusicWarble.ino b/software/apps/Modeling/ABSlaveMusicWarble/ABSlaveMusicWarble.ino similarity index 100% rename from software/apps/M&MStudioBV/ABSlaveMusicWarble/ABSlaveMusicWarble.ino rename to software/apps/Modeling/ABSlaveMusicWarble/ABSlaveMusicWarble.ino diff --git a/software/apps/M&MStudioBV/Bumps4/Bumps4.ino b/software/apps/Modeling/Bumps4/Bumps4.ino similarity index 100% rename from software/apps/M&MStudioBV/Bumps4/Bumps4.ino rename to software/apps/Modeling/Bumps4/Bumps4.ino diff --git a/software/apps/M&MStudioBV/FM/CenterFSR_A/CenterFSR_A.ino b/software/apps/Modeling/FM/CenterFSR_A/CenterFSR_A.ino similarity index 100% rename from software/apps/M&MStudioBV/FM/CenterFSR_A/CenterFSR_A.ino rename to software/apps/Modeling/FM/CenterFSR_A/CenterFSR_A.ino diff --git a/software/apps/M&MStudioBV/FM/FM.ino b/software/apps/Modeling/FM/FM.ino similarity index 100% rename from software/apps/M&MStudioBV/FM/FM.ino rename to software/apps/Modeling/FM/FM.ino diff --git a/software/apps/M&MStudioBV/FM/FMGraph/FMGraph.pde b/software/apps/Modeling/FM/FMGraph/FMGraph.pde similarity index 100% rename from software/apps/M&MStudioBV/FM/FMGraph/FMGraph.pde rename to software/apps/Modeling/FM/FMGraph/FMGraph.pde diff --git a/software/apps/M&MStudioBV/PluckOverlap/PluckOverlap.ino b/software/apps/Modeling/PluckOverlap/PluckOverlap.ino similarity index 100% rename from software/apps/M&MStudioBV/PluckOverlap/PluckOverlap.ino rename to software/apps/Modeling/PluckOverlap/PluckOverlap.ino diff --git a/software/apps/M&MStudioBV/PluckOverlapHalf/PluckOverlapHalf.ino b/software/apps/Modeling/PluckOverlapHalf/PluckOverlapHalf.ino similarity index 100% rename from software/apps/M&MStudioBV/PluckOverlapHalf/PluckOverlapHalf.ino rename to software/apps/Modeling/PluckOverlapHalf/PluckOverlapHalf.ino diff --git a/software/apps/M&MStudioBV/Theremin/Theremin.ino b/software/apps/Modeling/Theremin/Theremin.ino similarity index 100% rename from software/apps/M&MStudioBV/Theremin/Theremin.ino rename to software/apps/Modeling/Theremin/Theremin.ino diff --git a/software/apps/M&MStudioBV/WallPluck_in/WallPluck_in.ino b/software/apps/Modeling/WallPluck_in/WallPluck_in.ino similarity index 100% rename from software/apps/M&MStudioBV/WallPluck_in/WallPluck_in.ino rename to software/apps/Modeling/WallPluck_in/WallPluck_in.ino diff --git a/software/apps/M&MStudioBV/WallPluck_out/WallPluck_out.ino b/software/apps/Modeling/WallPluck_out/WallPluck_out.ino similarity index 100% rename from software/apps/M&MStudioBV/WallPluck_out/WallPluck_out.ino rename to software/apps/Modeling/WallPluck_out/WallPluck_out.ino diff --git a/software/apps/Motion/Center/Center.ino b/software/apps/Motion/Center/Center.ino deleted file mode 100644 index 78eb5f7..0000000 --- a/software/apps/Motion/Center/Center.ino +++ /dev/null @@ -1,44 +0,0 @@ -//Center -//uses a variable force (pwm duty) -//If it feels like a mountain - pushing away from center, then -//reverse the motor leads -//or for a quick fix in the code: change if(f < 0) to if (f > 0) - -#include "Motor.h" -#include "Music.h" - -int posA, posB; // position from analogRead -int forceA, forceB; // computed from pos and k -int kA, kB = 2; // spring constant -//int duty; // pwm duty for Timer1 (range 0 - 1023) 10-bit resolution - -void setup() -{ - MotorA.init(); - MotorB.init(); - Music.init(); - -} - -void loop() -{ - - posA = analogRead(A0); - posB = analogRead(A3); - - Music.setFrequency1(posA); - Music.setFrequency2(posB); - - forceA = - kA * (512 - posA); - forceB = - kB * (512 - posB); - //duty = abs(force); - //duty = min(512, duty); - - MotorA.torque(forceA); //force can be -512 to +511 - MotorB.torque(forceB); //force can be -512 to +511 - - //if(force < 0) MotorA.direction(FORWARD); - //else MotorA.direction(BACKWARD); - -} - diff --git a/software/apps/Motion/CenterA/CenterA.ino b/software/apps/Motion/CenterA/CenterA.ino deleted file mode 100644 index 6370077..0000000 --- a/software/apps/Motion/CenterA/CenterA.ino +++ /dev/null @@ -1,34 +0,0 @@ -//Center -//uses a variable force (pwm duty) -//If it feels like a "mountain" - pushing away from center, then -//reverse the motor leads to make it feel like a "valley" -//or for a quick fix in the code: change if(f < 0) to if (f > 0) - -#include - -int pos; // position from analogRead -int force; // computed from pos and k -int k = 10; // spring constant -int duty; // pwm duty for Timer1 (range 0 - 1023) 10-bit resolution - -void setup() -{ - MotorA.init(); -} - -void loop() -{ - - pos = analogRead(A0); - - force = k * (512 - pos); - duty = abs(force); - duty = min(511, duty); - - MotorA.torque(duty); - - if(force < 0) MotorA.direction(FORWARD); - else MotorA.direction(BACKWARD); - -} - diff --git a/software/apps/M&MStudioBV/CenterABtoggle/CenterABtoggle.ino b/software/apps/Motion/CenterABtoggle/CenterABtoggle.ino similarity index 100% rename from software/apps/M&MStudioBV/CenterABtoggle/CenterABtoggle.ino rename to software/apps/Motion/CenterABtoggle/CenterABtoggle.ino diff --git a/software/apps/Motion/CenterB/CenterB.ino b/software/apps/Motion/CenterB/CenterB.ino deleted file mode 100644 index d9a21f2..0000000 --- a/software/apps/Motion/CenterB/CenterB.ino +++ /dev/null @@ -1,36 +0,0 @@ -//Center -//uses a variable force (pwm duty) -//If it feels like a "mountain" - pushing away from center, then -//reverse the motor leads to make it feel like a "valley" -//or for a quick fix in the code: change if(f < 0) to if (f > 0) - -#include - -int pos; // position from analogRead -int force; // computed from pos and k -int k = 1; // spring constant -int duty; // pwm duty for Timer1 (range 0 - 1023) 10-bit resolution - -void setup() -{ - - MotorB.torque(100); //is this necessary? - -} - -void loop() -{ - - pos = analogRead(A3); - - force = k * (512 - pos); - duty = abs(force); - duty = min(1023, duty); - - MotorB.torque(duty); - - if(force < 0) MotorB.direction(FORWARD); - else MotorB.direction(BACKWARD); - -} - diff --git a/software/apps/Motion/Center_with_2_oscillators/Center_with_2_oscillators.ino b/software/apps/Motion/Center_with_2_oscillators/Center_with_2_oscillators.ino deleted file mode 100644 index c85b09b..0000000 --- a/software/apps/Motion/Center_with_2_oscillators/Center_with_2_oscillators.ino +++ /dev/null @@ -1,41 +0,0 @@ -//Center two motors control two frequencies. (jb&bv 25Jan13) -//uses a variable force (pwm duty) -//If it feels like a mountain - pushing away from center, then -//reverse the motor leads or the sign of forceA or forceB -//or for a quick fix in the code: change if(f < 0) to if (f > 0) - -// notes to me (bv) - -#include "Motor.h" -#include "Music.h" - -int posA, posB; // position from analogRead -int forceA, forceB; // computed from pos and k -int kA = 2; // spring constant -int kB = 2; // spring constant -//int duty; // pwm duty for Timer1 (range 0 - 1023) 10-bit resolution - -void setup() -{ - MotorA.init(); - Music.init(); // 12-bit sine default (see .cpp file) - //Music.setWaveform(0); // only works with 8bit waveforms -} - -void loop() -{ - - posA = analogRead(A0); - posB = analogRead(A3); - - Music.setFrequency1(posA); - Music.setFrequency2(posB); - - forceA = - kA * (512 - posA); // check wiring??? - forceB = kB * (512 - posB); - - MotorA.torque(forceA); // forceA [-512 to +511] ??? - MotorB.torque(forceB); - -} - diff --git a/software/apps/Motion/Damp using Velocity/Damp1/Damp1.ino b/software/apps/Motion/Damp using Velocity/Damp1/Damp1.ino deleted file mode 100644 index 45c36b0..0000000 --- a/software/apps/Motion/Damp using Velocity/Damp1/Damp1.ino +++ /dev/null @@ -1,23 +0,0 @@ -//Damp - measure velocity then f=Bv -#import -int x; //position measured - then filtered -float v, f, t, xold; //velocity, force, time delta -byte c; //for debug print every 256th loop - -void setup(){ - Serial.begin(9600); - xold = analogRead(A0); -} - -void loop(){ - x = analogRead(A0); - v = x - xold; //lag v, too? - xold += 0.1*(x-xold); //slide xold with lag - - if(c++==0){ - //Serial.print(xold); - //Serial.print(" "); - Serial.println(100*v); - } -} - diff --git a/software/apps/Motion/Damp using Velocity/Damp2/Damp2.ino b/software/apps/Motion/Damp using Velocity/Damp2/Damp2.ino deleted file mode 100644 index af8764a..0000000 --- a/software/apps/Motion/Damp using Velocity/Damp2/Damp2.ino +++ /dev/null @@ -1,28 +0,0 @@ -//Damp 2 with running average position - -#define n 10 //number in buffer -int x; //position measured -float xf; // running average on n samples -int buff[n]; -int index = 0; -float v, oldavg; // estimate of velocity -byte c; - -void setup(){ - Serial.begin(9600); -} - -void loop(){ - buff[index] = analogRead(A0); - index++; - if(index > n-1) index = 0; - int acc = 0; - for(int i=0; i 0) { - x = analogRead(A0)/4; //just for this test - xtab[i] = x; //put it in array of x - i = i + 1; //index to last x (9 times ago) - if(i>9)i=0; //increment index - v = x - xtab[i]; //difference x vs old x - t = (t+1)%256; - // send sensor values: - Serial.write(x); // sends one byte [0-255] - Serial.write(v+128); - Serial.write(t); - } -} - diff --git a/software/apps/Motion/Damp using Velocity/Graph2/Graph2.maxpat b/software/apps/Motion/Damp using Velocity/Graph2/Graph2.maxpat deleted file mode 100644 index 6644143..0000000 --- a/software/apps/Motion/Damp using Velocity/Graph2/Graph2.maxpat +++ /dev/null @@ -1,1460 +0,0 @@ -{ - "patcher" : { - "fileversion" : 1, - "appversion" : { - "major" : 6, - "minor" : 0, - "revision" : 5 - } -, - "rect" : [ 122.0, 49.0, 1158.0, 706.0 ], - "bglocked" : 0, - "openinpresentation" : 0, - "default_fontsize" : 12.0, - "default_fontface" : 0, - "default_fontname" : "Arial", - "gridonopen" : 0, - "gridsize" : [ 15.0, 15.0 ], - "gridsnaponopen" : 0, - "statusbarvisible" : 2, - "toolbarvisible" : 1, - "boxanimatetime" : 200, - "imprint" : 0, - "enablehscroll" : 1, - "enablevscroll" : 1, - "devicewidth" : 0.0, - "description" : "", - "digest" : "", - "tags" : "", - "boxes" : [ { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-46", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 134.0, 690.0, 37.0, 21.0 ], - "text" : "v" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-45", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 134.0, 591.0, 37.0, 21.0 ], - "text" : "x" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-42", - "maxclass" : "number", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 804.5, 499.0, 50.0, 20.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-40", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "patching_rect" : [ 861.0, 459.0, 32.5, 20.0 ], - "text" : "* 8" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-39", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "patching_rect" : [ 861.0, 418.0, 38.0, 20.0 ], - "text" : "- 128" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-38", - "maxclass" : "number", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 804.5, 459.0, 50.0, 20.0 ] - } - - } -, { - "box" : { - "hint" : "x 186 y 210", - "id" : "obj-16", - "maxclass" : "itable", - "name" : "", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 157.0, 650.0, 706.0, 121.0 ], - "range" : 128, - "signed" : 1, - "size" : 255, - "table_data" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] - } - - } -, { - "box" : { - "hint" : "x 0 y 236", - "id" : "obj-5", - "maxclass" : "itable", - "name" : "", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 157.0, 551.0, 706.0, 114.0 ], - "range" : 255, - "size" : 255, - "table_data" : [ 0, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-41", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patcher" : { - "fileversion" : 1, - "appversion" : { - "major" : 6, - "minor" : 0, - "revision" : 5 - } -, - "rect" : [ 54.0, 94.0, 410.0, 385.0 ], - "bglocked" : 0, - "openinpresentation" : 0, - "default_fontsize" : 12.0, - "default_fontface" : 0, - "default_fontname" : "Arial", - "gridonopen" : 0, - "gridsize" : [ 15.0, 15.0 ], - "gridsnaponopen" : 0, - "statusbarvisible" : 2, - "toolbarvisible" : 1, - "boxanimatetime" : 200, - "imprint" : 0, - "enablehscroll" : 1, - "enablevscroll" : 1, - "devicewidth" : 0.0, - "description" : "", - "digest" : "", - "tags" : "", - "boxes" : [ { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-6", - "linecount" : 4, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 212.0, 124.0, 166.0, 62.0 ], - "text" : "this subpacth filters out any residual ASCII 65 messages in the serial bufer from initial startup." - } - - } -, { - "box" : { - "comment" : "", - "id" : "obj-4", - "maxclass" : "inlet", - "numinlets" : 0, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "patching_rect" : [ 187.0, 23.0, 25.0, 25.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-3", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "int" ], - "patching_rect" : [ 100.0, 212.0, 32.5, 20.0 ], - "text" : "t i 1" - } - - } -, { - "box" : { - "comment" : "", - "id" : "obj-2", - "maxclass" : "outlet", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 41.0, 334.0, 25.0, 25.0 ] - } - - } -, { - "box" : { - "comment" : "", - "id" : "obj-1", - "maxclass" : "inlet", - "numinlets" : 0, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 76.0, 23.0, 25.0, 25.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-40", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 41.0, 145.0, 54.0, 20.0 ], - "text" : "gate 2 2" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-38", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "bang", "" ], - "patching_rect" : [ 76.0, 175.0, 43.0, 20.0 ], - "text" : "sel 65" - } - - } - ], - "lines" : [ { - "patchline" : { - "destination" : [ "obj-40", 1 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-1", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-2", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 109.5, 278.0, 50.5, 278.0 ], - "source" : [ "obj-3", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-40", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 123.0, 251.0, 182.0, 251.0, 182.0, 107.0, 50.5, 107.0 ], - "source" : [ "obj-3", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-3", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-38", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-40", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-4", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-2", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-40", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-38", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-40", 1 ] - } - - } - ], - "dependency_cache" : [ ] - } -, - "patching_rect" : [ 134.0, 352.0, 112.0, 20.0 ], - "saved_object_attributes" : { - "tags" : "", - "digest" : "", - "default_fontname" : "Arial", - "fontname" : "Arial", - "default_fontsize" : 12.0, - "description" : "", - "globalpatchername" : "", - "fontface" : 0, - "fontsize" : 12.0, - "default_fontface" : 0 - } -, - "text" : "p filter_extra_bytes" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-8", - "maxclass" : "newobj", - "numinlets" : 0, - "numoutlets" : 1, - "outlettype" : [ "bang" ], - "patching_rect" : [ 423.0, 65.0, 65.0, 20.0 ], - "text" : "closebang" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-7", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "bang" ], - "patching_rect" : [ 355.0, 65.0, 60.0, 20.0 ], - "text" : "loadbang" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-37", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 726.0, 102.0, 207.0, 20.0 ], - "text" : "choose a serial port from this menu" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-28", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 695.0, 157.0, 79.0, 20.0 ], - "text" : "prepend port" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-4", - "items" : [ "Bluetooth-PDA-Sync", ",", "Bluetooth-Modem" ], - "maxclass" : "umenu", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "int", "", "" ], - "parameter_enable" : 0, - "patching_rect" : [ 604.0, 128.0, 200.0, 20.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-32", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 604.0, 79.0, 98.0, 20.0 ], - "text" : "prepend append" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-33", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "clear" ], - "patching_rect" : [ 675.0, 45.0, 43.0, 20.0 ], - "text" : "t clear" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-34", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 604.0, 45.0, 27.0, 20.0 ], - "text" : "iter" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-36", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 604.0, 12.0, 62.0, 20.0 ], - "text" : "route port" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-9", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 279.0, 361.0, 32.5, 18.0 ], - "text" : "65" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-6", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "bang", "" ], - "patching_rect" : [ 279.0, 332.0, 36.0, 20.0 ], - "text" : "sel 1" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-65", - "linecount" : 3, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 179.0, 404.0, 425.0, 48.0 ], - "text" : "trigger (or [t]) forces right-left conventions. All the drawing and processing will happen before Max requests new values. When this trigger fires, it sends an ASCII A to ask Arduino for new values." - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-64", - "linecount" : 2, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 117.0, 273.0, 135.0, 34.0 ], - "text" : "reinitializes the gates when turned on and off" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-63", - "linecount" : 5, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 400.0, 250.0, 233.0, 75.0 ], - "text" : "checks for the ascii value of \"A\" to begin cominucation. After initial communication is made, this block shuts down. A byte is sent back to the Arduino, indicating the patch is ready to receive information." - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-57", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "int" ], - "patching_rect" : [ 252.0, 273.0, 34.0, 20.0 ], - "text" : "t 2 0" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-55", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "patching_rect" : [ 325.0, 331.0, 32.5, 20.0 ], - "text" : "!- 1" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-54", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 325.0, 250.0, 54.0, 20.0 ], - "text" : "gate 1 1" - } - - } -, { - "box" : { - "id" : "obj-53", - "maxclass" : "toggle", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 325.0, 300.0, 20.0, 20.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-50", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 134.0, 328.0, 54.0, 20.0 ], - "text" : "gate 1 0" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-48", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "bang", "" ], - "patching_rect" : [ 325.0, 275.0, 43.0, 20.0 ], - "text" : "sel 65" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-35", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "" ], - "patching_rect" : [ 134.0, 399.0, 42.0, 21.0 ], - "text" : "t 65 l" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-1", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 475.0, 499.0, 37.0, 21.0 ], - "text" : "t" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-3", - "maxclass" : "number", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 407.0, 499.0, 56.0, 21.0 ] - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-18", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 350.0, 500.0, 37.0, 21.0 ], - "text" : "v" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-20", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 222.0, 500.0, 37.0, 21.0 ], - "text" : "x" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-22", - "maxclass" : "number", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 282.0, 500.0, 56.0, 21.0 ] - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-23", - "maxclass" : "number", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 157.0, 500.0, 55.0, 21.0 ] - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-29", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "int", "int", "int" ], - "patching_rect" : [ 157.0, 465.0, 269.0, 21.0 ], - "text" : "unpack 0 0 0" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-31", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 134.0, 375.0, 71.0, 21.0 ], - "text" : "zl group 3" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-30", - "maxclass" : "newobj", - "numinlets" : 3, - "numoutlets" : 3, - "outlettype" : [ "bang", "bang", "" ], - "patching_rect" : [ 252.0, 65.0, 62.0, 20.0 ], - "text" : "select 0 1" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-26", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 330.0, 156.0, 206.0, 20.0 ], - "text" : "click here to close the serial port" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-27", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 355.0, 127.0, 227.0, 20.0 ], - "text" : "click here to open the selected serial port" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-21", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 282.0, 156.0, 39.0, 18.0 ], - "text" : "close" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-19", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 304.0, 127.0, 37.0, 18.0 ], - "text" : "open" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-2", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 375.0, 98.0, 207.0, 20.0 ], - "text" : "Click here to get a list of serial ports" - } - - } -, { - "box" : { - "id" : "obj-11", - "maxclass" : "toggle", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 169.0, 20.0, 22.0, 22.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-12", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "bang" ], - "patching_rect" : [ 169.0, 65.0, 65.0, 20.0 ], - "text" : "qmetro 10" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-13", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 324.0, 98.0, 36.0, 18.0 ], - "text" : "print" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-14", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "" ], - "patching_rect" : [ 169.0, 210.0, 155.0, 20.0 ], - "text" : "serial a 9600 @autoopen 0" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-15", - "linecount" : 2, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 18.0, 57.0, 142.0, 34.0 ], - "text" : "Read serial input buffer every 10 milliseconds" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-17", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 188.0, 20.0, 117.0, 20.0 ], - "text" : "Click to start" - } - - } -, { - "box" : { - "background" : 1, - "bgcolor" : [ 1.0, 0.788235, 0.470588, 1.0 ], - "border" : 0, - "bordercolor" : [ 0.0, 0.0, 0.0, 1.0 ], - "fontface" : 1, - "fontname" : "Arial", - "fontsize" : 13.0, - "hint" : "", - "id" : "obj-10", - "ignoreclick" : 1, - "maxclass" : "textbutton", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "", "", "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 270.0, 20.0, 20.0, 20.0 ], - "rounded" : 60.0, - "text" : "3", - "textcolor" : [ 0.34902, 0.34902, 0.34902, 1.0 ], - "textovercolor" : [ 0.2, 0.2, 0.2, 1.0 ] - } - - } -, { - "box" : { - "background" : 1, - "bgcolor" : [ 1.0, 0.788235, 0.470588, 1.0 ], - "border" : 0, - "bordercolor" : [ 0.0, 0.0, 0.0, 1.0 ], - "fontface" : 1, - "fontname" : "Arial", - "fontsize" : 13.0, - "hint" : "", - "id" : "obj-25", - "ignoreclick" : 1, - "maxclass" : "textbutton", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "", "", "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 706.0, 102.0, 20.0, 20.0 ], - "rounded" : 60.0, - "text" : "2", - "textcolor" : [ 0.34902, 0.34902, 0.34902, 1.0 ], - "textovercolor" : [ 0.2, 0.2, 0.2, 1.0 ] - } - - } -, { - "box" : { - "background" : 1, - "bgcolor" : [ 1.0, 0.788235, 0.470588, 1.0 ], - "border" : 0, - "bordercolor" : [ 0.0, 0.0, 0.0, 1.0 ], - "fontface" : 1, - "fontname" : "Arial", - "fontsize" : 13.0, - "hint" : "", - "id" : "obj-93", - "ignoreclick" : 1, - "maxclass" : "textbutton", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "", "", "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 568.0, 98.0, 20.0, 20.0 ], - "rounded" : 60.0, - "text" : "1", - "textcolor" : [ 0.34902, 0.34902, 0.34902, 1.0 ], - "textovercolor" : [ 0.2, 0.2, 0.2, 1.0 ] - } - - } - ], - "lines" : [ { - "patchline" : { - "destination" : [ "obj-12", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-11", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-30", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 178.5, 56.0, 261.5, 56.0 ], - "source" : [ "obj-11", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.168982, 0.8, 0.273315, 0.9 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 178.5, 147.0, 178.5, 147.0 ], - "source" : [ "obj-12", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.168982, 0.8, 0.273315, 0.9 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 333.5, 120.5, 178.5, 120.5 ], - "source" : [ "obj-13", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.004775, 0.8, 0.9 ], - "destination" : [ "obj-36", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 314.5, 231.0, 600.0, 231.0, 600.0, 9.0, 613.5, 9.0 ], - "source" : [ "obj-14", 1 ] - } - - } -, { - "patchline" : { - "color" : [ 0.740956, 0.137093, 0.8, 0.9 ], - "destination" : [ "obj-50", 1 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-14", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.771514, 0.155069, 0.8, 0.9 ], - "destination" : [ "obj-54", 1 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 178.5, 237.0, 369.5, 237.0 ], - "source" : [ "obj-14", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.168982, 0.8, 0.273315, 0.9 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 313.5, 151.5, 178.5, 151.5 ], - "source" : [ "obj-19", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.168982, 0.8, 0.273315, 0.9 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 291.5, 185.5, 178.5, 185.5 ], - "source" : [ "obj-21", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-39", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-22", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-5", 1 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-23", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.076581, 0.8, 0.10276, 0.9 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 704.5, 200.0, 178.5, 200.0 ], - "source" : [ "obj-28", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-22", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-29", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-23", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-29", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-3", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-29", 2 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-16", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-3", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-5", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-3", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.0, 0.0, 0.9 ], - "destination" : [ "obj-19", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 283.0, 111.0, 313.5, 111.0 ], - "source" : [ "obj-30", 1 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.0, 0.0, 0.9 ], - "destination" : [ "obj-21", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 261.5, 135.0, 291.5, 135.0 ], - "source" : [ "obj-30", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.0, 0.0, 0.9 ], - "destination" : [ "obj-57", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 261.5, 178.5, 261.5, 178.5 ], - "source" : [ "obj-30", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-35", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-31", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-4", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-32", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-4", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-33", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-32", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-34", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.168982, 0.8, 0.273315, 0.9 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 143.5, 437.0, 107.0, 437.0, 107.0, 195.0, 178.5, 195.0 ], - "source" : [ "obj-35", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-29", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-35", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-33", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-36", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-34", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-36", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-38", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-39", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-40", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-39", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-28", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-4", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-16", 1 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-40", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-42", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-40", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-31", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-41", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-53", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-48", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-41", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-50", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-50", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 334.5, 321.0, 143.5, 321.0 ], - "source" : [ "obj-53", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-55", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-53", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-6", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 334.5, 326.5, 288.5, 326.5 ], - "source" : [ "obj-53", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-48", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-54", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-54", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 334.5, 354.0, 393.0, 354.0, 393.0, 246.0, 334.5, 246.0 ], - "source" : [ "obj-55", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-41", 1 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-57", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-53", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 276.5, 296.0, 334.5, 296.0 ], - "source" : [ "obj-57", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-9", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-6", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.0, 0.0, 0.9 ], - "destination" : [ "obj-13", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 364.5, 87.0, 336.0, 87.0, 336.0, 93.0, 333.5, 93.0 ], - "source" : [ "obj-7", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.0, 0.0, 1.0 ], - "destination" : [ "obj-21", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 432.5, 92.0, 309.0, 92.0, 309.0, 92.0, 291.5, 92.0 ], - "source" : [ "obj-8", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.168982, 0.8, 0.273315, 0.9 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-9", 0 ] - } - - } - ], - "dependency_cache" : [ ] - } - -} diff --git a/software/apps/Motion/Damp using Velocity/HaywardFOAWvel.pdf b/software/apps/Motion/Damp using Velocity/HaywardFOAWvel.pdf deleted file mode 100644 index 21b763f..0000000 Binary files a/software/apps/Motion/Damp using Velocity/HaywardFOAWvel.pdf and /dev/null differ diff --git a/software/apps/Motion/Damp using Velocity/VelocityPlot/VelocityPlot.ino b/software/apps/Motion/Damp using Velocity/VelocityPlot/VelocityPlot.ino deleted file mode 100644 index ca711b0..0000000 --- a/software/apps/Motion/Damp using Velocity/VelocityPlot/VelocityPlot.ino +++ /dev/null @@ -1,29 +0,0 @@ -int x, v, t; //position velocity time -#define n 10 -int xtab[n]; //table of x -int i; // index for table - -void setup() -{ - // start serial port at 9600 bps: - Serial.begin(9600); -} - -void loop() -{ - // if we get a valid byte, read analog ins: - //if (Serial.available() > 0) { - x = analogRead(A0)/4; //just for this test - xtab[i] = x; //put it in array of x - i = i + 1; //index to last x (9 times ago) - if(i>9)i=0; //increment index - v = x - xtab[i]; //difference x vs old x - t = (t+1)%256; - // send sensor values: - Serial.print(x); // sends one byte [0-255] - Serial.print(","); - Serial.print(v+128); - Serial.print(","); - Serial.println(t); -} - diff --git a/software/apps/Motion/Damp using Velocity/VelocityPlot/VelocityPlot.maxpat b/software/apps/Motion/Damp using Velocity/VelocityPlot/VelocityPlot.maxpat deleted file mode 100644 index edbf85d..0000000 --- a/software/apps/Motion/Damp using Velocity/VelocityPlot/VelocityPlot.maxpat +++ /dev/null @@ -1,1214 +0,0 @@ -{ - "patcher" : { - "fileversion" : 1, - "appversion" : { - "major" : 6, - "minor" : 0, - "revision" : 5 - } -, - "rect" : [ 350.0, 44.0, 901.0, 670.0 ], - "bglocked" : 0, - "openinpresentation" : 0, - "default_fontsize" : 12.0, - "default_fontface" : 0, - "default_fontname" : "Arial", - "gridonopen" : 0, - "gridsize" : [ 15.0, 15.0 ], - "gridsnaponopen" : 0, - "statusbarvisible" : 2, - "toolbarvisible" : 1, - "boxanimatetime" : 200, - "imprint" : 0, - "enablehscroll" : 1, - "enablevscroll" : 1, - "devicewidth" : 0.0, - "description" : "", - "digest" : "", - "tags" : "", - "boxes" : [ { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-42", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "patching_rect" : [ 826.0, 620.0, 38.0, 20.0 ], - "text" : "- 127" - } - - } -, { - "box" : { - "hint" : "x 186 y 210", - "id" : "obj-40", - "maxclass" : "itable", - "name" : "", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 128.0, 762.0, 706.0, 121.0 ], - "range" : 128, - "signed" : 1, - "size" : 255, - "table_data" : [ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 2, 1, 0, 1, 1, 2, 1, 1, 2, 0, 1, 1, 1, 1, 0, 1, 2, 0, 1, 1, 1, 2, 1, 1, 1, 0, 2, 1, 1, 1, 0, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 0, 1, 1, 2, 0, 0, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 0, 0, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] - } - - } -, { - "box" : { - "hint" : "x 0 y 236", - "id" : "obj-41", - "maxclass" : "itable", - "name" : "", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 128.0, 663.0, 706.0, 114.0 ], - "range" : 255, - "size" : 255, - "table_data" : [ 0, 115, 115, 115, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 116, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 116, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 116, 116, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 116, 115, 115, 116, 115, 116, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 116, 116, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 115, 115 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-37", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 664.0, 115.0, 207.0, 20.0 ], - "text" : "choose a serial port from this menu" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-14", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "" ], - "patching_rect" : [ 140.0, 210.0, 155.0, 20.0 ], - "text" : "serial a 9600 @autoopen 0" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-21", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 233.0, 141.0, 39.0, 18.0 ], - "text" : "close" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-16", - "maxclass" : "newobj", - "numinlets" : 0, - "numoutlets" : 1, - "outlettype" : [ "bang" ], - "patching_rect" : [ 290.0, 29.0, 65.0, 20.0 ], - "text" : "closebang" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-24", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "bang" ], - "patching_rect" : [ 359.0, 29.0, 60.0, 20.0 ], - "text" : "loadbang" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-28", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 633.0, 170.0, 79.0, 20.0 ], - "text" : "prepend port" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-31", - "items" : [ "usbserial-AH01D7PK", ",", "Bluetooth-PDA-Sync", ",", "Bluetooth-Modem" ], - "maxclass" : "umenu", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "int", "", "" ], - "parameter_enable" : 0, - "patching_rect" : [ 542.0, 141.0, 200.0, 20.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-32", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 542.0, 92.0, 98.0, 20.0 ], - "text" : "prepend append" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-33", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "clear" ], - "patching_rect" : [ 613.0, 58.0, 43.0, 20.0 ], - "text" : "t clear" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-34", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 542.0, 58.0, 27.0, 20.0 ], - "text" : "iter" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-36", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 542.0, 25.0, 62.0, 20.0 ], - "text" : "route port" - } - - } -, { - "box" : { - "color" : [ 1.0, 0.890196, 0.090196, 1.0 ], - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-7", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 161.0, 465.0, 74.0, 20.0 ], - "text" : "fromsymbol" - } - - } -, { - "box" : { - "color" : [ 1.0, 0.890196, 0.090196, 1.0 ], - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-8", - "maxclass" : "newobj", - "numinlets" : 3, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "patching_rect" : [ 161.0, 442.0, 46.0, 20.0 ], - "text" : "itoa" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-4", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 161.0, 419.0, 53.0, 20.0 ], - "text" : "zl group" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-10", - "maxclass" : "newobj", - "numinlets" : 3, - "numoutlets" : 3, - "outlettype" : [ "bang", "bang", "" ], - "patching_rect" : [ 105.0, 381.0, 75.0, 20.0 ], - "text" : "select 10 13" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-9", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 250.0, 361.0, 32.5, 18.0 ], - "text" : "65" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-6", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "bang", "" ], - "patching_rect" : [ 250.0, 332.0, 36.0, 20.0 ], - "text" : "sel 1" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-65", - "linecount" : 3, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 150.0, 505.0, 425.0, 48.0 ], - "text" : "trigger (or [t]) forces right-left conventions. All the drawing and processing will happen before Max requests new values. When this trigger fires, it sends an ASCII A to ask Arduino for new values." - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-64", - "linecount" : 2, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 83.5, 273.0, 135.0, 34.0 ], - "text" : "reinitializes the gates when turned on and off" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-63", - "linecount" : 5, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 368.0, 231.0, 254.0, 75.0 ], - "text" : "checks for the ascii value of newline to begin communication. After initial communication is made, this block shuts down. A byte is sent back to the Arduino, indicating the patch is ready to receive information." - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-57", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "patching_rect" : [ 223.0, 273.0, 32.5, 20.0 ], - "text" : "0" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-55", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "patching_rect" : [ 296.0, 331.0, 32.5, 20.0 ], - "text" : "!- 1" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-54", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 296.0, 250.0, 54.0, 20.0 ], - "text" : "gate 1 1" - } - - } -, { - "box" : { - "id" : "obj-53", - "maxclass" : "toggle", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 296.0, 300.0, 20.0, 20.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-50", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 105.0, 350.0, 54.0, 20.0 ], - "text" : "gate 1 0" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-48", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "bang", "" ], - "patching_rect" : [ 296.0, 273.0, 43.0, 20.0 ], - "text" : "sel 10" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-35", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "" ], - "patching_rect" : [ 105.0, 504.0, 42.0, 21.0 ], - "text" : "t 65 l" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-1", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 449.0, 596.0, 37.0, 21.0 ], - "text" : "t" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-3", - "maxclass" : "number", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 378.0, 596.0, 56.0, 21.0 ] - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-18", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 321.0, 596.0, 37.0, 21.0 ], - "text" : "v" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-20", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 193.0, 596.0, 37.0, 21.0 ], - "text" : "x" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-22", - "maxclass" : "number", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 253.0, 596.0, 56.0, 21.0 ] - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-23", - "maxclass" : "number", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 128.0, 596.0, 55.0, 21.0 ] - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-29", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 5, - "outlettype" : [ "int", "int", "int", "int", "int" ], - "patching_rect" : [ 128.0, 561.0, 269.0, 21.0 ], - "text" : "unpack 0 0 0 0 0" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-30", - "maxclass" : "newobj", - "numinlets" : 3, - "numoutlets" : 3, - "outlettype" : [ "bang", "bang", "" ], - "patching_rect" : [ 223.0, 50.0, 62.0, 20.0 ], - "text" : "select 0 1" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-26", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 281.0, 141.0, 206.0, 20.0 ], - "text" : "click here to close the serial port" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-27", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 306.0, 115.0, 206.0, 20.0 ], - "text" : "click here to open the serial port" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-19", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 255.0, 115.0, 37.0, 18.0 ], - "text" : "open" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-2", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 316.0, 85.0, 207.0, 20.0 ], - "text" : "Click here to get a list of serial ports" - } - - } -, { - "box" : { - "id" : "obj-11", - "maxclass" : "toggle", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 140.0, 5.0, 22.0, 22.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-12", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "bang" ], - "patching_rect" : [ 140.0, 50.0, 65.0, 20.0 ], - "text" : "qmetro 10" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-13", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 275.0, 89.0, 36.0, 18.0 ], - "text" : "print" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-15", - "linecount" : 2, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 7.0, 50.0, 136.0, 34.0 ], - "text" : "Read serial input buffer every 10 milliseconds" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-17", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 167.0, 8.0, 79.0, 20.0 ], - "text" : "Click to start" - } - - } -, { - "box" : { - "background" : 1, - "bgcolor" : [ 1.0, 0.788235, 0.470588, 1.0 ], - "border" : 0, - "bordercolor" : [ 0.0, 0.0, 0.0, 1.0 ], - "fontface" : 1, - "fontname" : "Arial", - "fontsize" : 13.0, - "hint" : "", - "id" : "obj-38", - "ignoreclick" : 1, - "maxclass" : "textbutton", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "", "", "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 640.0, 115.0, 20.0, 20.0 ], - "rounded" : 60.0, - "text" : "2", - "textcolor" : [ 0.34902, 0.34902, 0.34902, 1.0 ], - "textovercolor" : [ 0.2, 0.2, 0.2, 1.0 ] - } - - } -, { - "box" : { - "background" : 1, - "bgcolor" : [ 1.0, 0.788235, 0.470588, 1.0 ], - "border" : 0, - "bordercolor" : [ 0.0, 0.0, 0.0, 1.0 ], - "fontface" : 1, - "fontname" : "Arial", - "fontsize" : 13.0, - "hint" : "", - "id" : "obj-25", - "ignoreclick" : 1, - "maxclass" : "textbutton", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "", "", "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 244.0, 8.0, 20.0, 20.0 ], - "rounded" : 60.0, - "text" : "3", - "textcolor" : [ 0.34902, 0.34902, 0.34902, 1.0 ], - "textovercolor" : [ 0.2, 0.2, 0.2, 1.0 ] - } - - } -, { - "box" : { - "background" : 1, - "bgcolor" : [ 1.0, 0.788235, 0.470588, 1.0 ], - "border" : 0, - "bordercolor" : [ 0.0, 0.0, 0.0, 1.0 ], - "fontface" : 1, - "fontname" : "Arial", - "fontsize" : 13.0, - "hint" : "", - "id" : "obj-93", - "ignoreclick" : 1, - "maxclass" : "textbutton", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "", "", "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 512.0, 85.0, 20.0, 20.0 ], - "rounded" : 60.0, - "text" : "1", - "textcolor" : [ 0.34902, 0.34902, 0.34902, 1.0 ], - "textovercolor" : [ 0.2, 0.2, 0.2, 1.0 ] - } - - } - ], - "lines" : [ { - "patchline" : { - "destination" : [ "obj-4", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 170.5, 422.0, 170.5, 422.0 ], - "source" : [ "obj-10", 2 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-4", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 114.5, 409.5, 170.5, 409.5 ], - "source" : [ "obj-10", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-12", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-11", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-30", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 149.5, 41.0, 232.5, 41.0 ], - "source" : [ "obj-11", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.057615, 0.8, 0.189809, 1.0 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-12", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.057615, 0.8, 0.189809, 1.0 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 284.5, 110.5, 149.5, 110.5 ], - "source" : [ "obj-13", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.106881, 0.233439, 0.8, 0.9 ], - "destination" : [ "obj-36", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 285.5, 231.0, 355.0, 231.0, 355.0, 171.0, 529.0, 171.0, 529.0, 105.0, 538.0, 105.0, 538.0, 21.0, 551.5, 21.0 ], - "source" : [ "obj-14", 1 ] - } - - } -, { - "patchline" : { - "color" : [ 0.586327, 0.12593, 0.8, 0.9 ], - "destination" : [ "obj-50", 1 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-14", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.586327, 0.12593, 0.8, 0.9 ], - "destination" : [ "obj-54", 1 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 149.5, 237.0, 340.5, 237.0 ], - "source" : [ "obj-14", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.0, 0.0, 0.9 ], - "destination" : [ "obj-21", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 299.5, 76.0, 262.0, 76.0, 262.0, 76.0, 242.5, 76.0 ], - "source" : [ "obj-16", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.057615, 0.8, 0.189809, 1.0 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 264.5, 138.5, 149.5, 138.5 ], - "source" : [ "obj-19", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.057615, 0.8, 0.189809, 1.0 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 242.5, 159.0, 149.5, 159.0 ], - "source" : [ "obj-21", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-42", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-22", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-41", 1 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-23", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.0, 0.0, 0.9 ], - "destination" : [ "obj-13", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 368.5, 79.0, 286.0, 79.0, 286.0, 84.0, 284.5, 84.0 ], - "source" : [ "obj-24", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.057615, 0.8, 0.189809, 1.0 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 642.5, 192.0, 149.5, 192.0 ], - "source" : [ "obj-28", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-22", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-29", 2 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-23", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-29", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-3", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-29", 4 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-40", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-3", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-41", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-3", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.0, 0.0, 0.9 ], - "destination" : [ "obj-19", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 254.0, 102.0, 264.5, 102.0 ], - "source" : [ "obj-30", 1 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.0, 0.0, 0.9 ], - "destination" : [ "obj-21", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 232.5, 126.0, 242.5, 126.0 ], - "source" : [ "obj-30", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.0, 0.0, 0.9 ], - "destination" : [ "obj-57", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 232.5, 171.0, 232.5, 171.0 ], - "source" : [ "obj-30", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-28", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-31", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-31", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-32", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-31", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-33", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-32", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-34", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.057615, 0.8, 0.189809, 1.0 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 114.5, 536.0, 78.0, 536.0, 78.0, 195.0, 149.5, 195.0 ], - "source" : [ "obj-35", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-29", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-35", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-33", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-36", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-34", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-36", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-8", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-4", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-40", 1 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-42", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-53", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-48", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-10", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-50", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-50", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 305.5, 321.0, 114.5, 321.0 ], - "source" : [ "obj-53", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-55", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-53", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-6", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 305.5, 326.5, 259.5, 326.5 ], - "source" : [ "obj-53", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-48", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-54", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-54", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 305.5, 354.0, 364.0, 354.0, 364.0, 246.0, 305.5, 246.0 ], - "source" : [ "obj-55", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-53", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 232.5, 296.0, 305.5, 296.0 ], - "source" : [ "obj-57", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-9", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-6", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-35", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 170.5, 494.0, 114.5, 494.0 ], - "source" : [ "obj-7", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-7", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-8", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.057615, 0.8, 0.189809, 1.0 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-9", 0 ] - } - - } - ], - "dependency_cache" : [ ] - } - -} diff --git a/software/apps/Motion/Damp using Velocity/VelositySend/VelositySend.ino b/software/apps/Motion/Damp using Velocity/VelositySend/VelositySend.ino deleted file mode 100644 index a398371..0000000 --- a/software/apps/Motion/Damp using Velocity/VelositySend/VelositySend.ino +++ /dev/null @@ -1,41 +0,0 @@ -// Velosity sends only one byte values - -int x, v, t; //position velocity time - -#define n 10 -int xtab[n]; //table of x -int i; // index for table - -void setup() -{ - // start serial port at 9600 bps: - Serial.begin(9600); - establishContact(); // send a byte to establish contact until receiver responds -} - -void loop() -{ - // if we get a valid byte, read analog ins: - if (Serial.available() > 0) { - x = analogRead(A0)/4; - xtab[i] = x; //put it in array of x - i = i + 1; //index to last x (9 times ago) - if(i>9)i=0; //increment index - v = x - xtab[i]; //difference x vs old x - t = (t+1)%256; - // send sensor values: - Serial.write(x); - Serial.write(","); - Serial.write(v+128); - Serial.write(","); - Serial.write(t); - } -} - -void establishContact() { - while (Serial.available() <= 0) { - Serial.println("0,0,0"); // send an initial string - delay(300); - } -} - diff --git a/software/apps/Motion/Graph2.maxpat b/software/apps/Motion/Graph2.maxpat deleted file mode 100644 index 6644143..0000000 --- a/software/apps/Motion/Graph2.maxpat +++ /dev/null @@ -1,1460 +0,0 @@ -{ - "patcher" : { - "fileversion" : 1, - "appversion" : { - "major" : 6, - "minor" : 0, - "revision" : 5 - } -, - "rect" : [ 122.0, 49.0, 1158.0, 706.0 ], - "bglocked" : 0, - "openinpresentation" : 0, - "default_fontsize" : 12.0, - "default_fontface" : 0, - "default_fontname" : "Arial", - "gridonopen" : 0, - "gridsize" : [ 15.0, 15.0 ], - "gridsnaponopen" : 0, - "statusbarvisible" : 2, - "toolbarvisible" : 1, - "boxanimatetime" : 200, - "imprint" : 0, - "enablehscroll" : 1, - "enablevscroll" : 1, - "devicewidth" : 0.0, - "description" : "", - "digest" : "", - "tags" : "", - "boxes" : [ { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-46", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 134.0, 690.0, 37.0, 21.0 ], - "text" : "v" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-45", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 134.0, 591.0, 37.0, 21.0 ], - "text" : "x" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-42", - "maxclass" : "number", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 804.5, 499.0, 50.0, 20.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-40", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "patching_rect" : [ 861.0, 459.0, 32.5, 20.0 ], - "text" : "* 8" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-39", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "patching_rect" : [ 861.0, 418.0, 38.0, 20.0 ], - "text" : "- 128" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-38", - "maxclass" : "number", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 804.5, 459.0, 50.0, 20.0 ] - } - - } -, { - "box" : { - "hint" : "x 186 y 210", - "id" : "obj-16", - "maxclass" : "itable", - "name" : "", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 157.0, 650.0, 706.0, 121.0 ], - "range" : 128, - "signed" : 1, - "size" : 255, - "table_data" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] - } - - } -, { - "box" : { - "hint" : "x 0 y 236", - "id" : "obj-5", - "maxclass" : "itable", - "name" : "", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 157.0, 551.0, 706.0, 114.0 ], - "range" : 255, - "size" : 255, - "table_data" : [ 0, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-41", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patcher" : { - "fileversion" : 1, - "appversion" : { - "major" : 6, - "minor" : 0, - "revision" : 5 - } -, - "rect" : [ 54.0, 94.0, 410.0, 385.0 ], - "bglocked" : 0, - "openinpresentation" : 0, - "default_fontsize" : 12.0, - "default_fontface" : 0, - "default_fontname" : "Arial", - "gridonopen" : 0, - "gridsize" : [ 15.0, 15.0 ], - "gridsnaponopen" : 0, - "statusbarvisible" : 2, - "toolbarvisible" : 1, - "boxanimatetime" : 200, - "imprint" : 0, - "enablehscroll" : 1, - "enablevscroll" : 1, - "devicewidth" : 0.0, - "description" : "", - "digest" : "", - "tags" : "", - "boxes" : [ { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-6", - "linecount" : 4, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 212.0, 124.0, 166.0, 62.0 ], - "text" : "this subpacth filters out any residual ASCII 65 messages in the serial bufer from initial startup." - } - - } -, { - "box" : { - "comment" : "", - "id" : "obj-4", - "maxclass" : "inlet", - "numinlets" : 0, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "patching_rect" : [ 187.0, 23.0, 25.0, 25.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-3", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "int" ], - "patching_rect" : [ 100.0, 212.0, 32.5, 20.0 ], - "text" : "t i 1" - } - - } -, { - "box" : { - "comment" : "", - "id" : "obj-2", - "maxclass" : "outlet", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 41.0, 334.0, 25.0, 25.0 ] - } - - } -, { - "box" : { - "comment" : "", - "id" : "obj-1", - "maxclass" : "inlet", - "numinlets" : 0, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 76.0, 23.0, 25.0, 25.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-40", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 41.0, 145.0, 54.0, 20.0 ], - "text" : "gate 2 2" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-38", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "bang", "" ], - "patching_rect" : [ 76.0, 175.0, 43.0, 20.0 ], - "text" : "sel 65" - } - - } - ], - "lines" : [ { - "patchline" : { - "destination" : [ "obj-40", 1 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-1", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-2", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 109.5, 278.0, 50.5, 278.0 ], - "source" : [ "obj-3", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-40", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 123.0, 251.0, 182.0, 251.0, 182.0, 107.0, 50.5, 107.0 ], - "source" : [ "obj-3", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-3", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-38", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-40", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-4", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-2", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-40", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-38", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-40", 1 ] - } - - } - ], - "dependency_cache" : [ ] - } -, - "patching_rect" : [ 134.0, 352.0, 112.0, 20.0 ], - "saved_object_attributes" : { - "tags" : "", - "digest" : "", - "default_fontname" : "Arial", - "fontname" : "Arial", - "default_fontsize" : 12.0, - "description" : "", - "globalpatchername" : "", - "fontface" : 0, - "fontsize" : 12.0, - "default_fontface" : 0 - } -, - "text" : "p filter_extra_bytes" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-8", - "maxclass" : "newobj", - "numinlets" : 0, - "numoutlets" : 1, - "outlettype" : [ "bang" ], - "patching_rect" : [ 423.0, 65.0, 65.0, 20.0 ], - "text" : "closebang" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-7", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "bang" ], - "patching_rect" : [ 355.0, 65.0, 60.0, 20.0 ], - "text" : "loadbang" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-37", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 726.0, 102.0, 207.0, 20.0 ], - "text" : "choose a serial port from this menu" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-28", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 695.0, 157.0, 79.0, 20.0 ], - "text" : "prepend port" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-4", - "items" : [ "Bluetooth-PDA-Sync", ",", "Bluetooth-Modem" ], - "maxclass" : "umenu", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "int", "", "" ], - "parameter_enable" : 0, - "patching_rect" : [ 604.0, 128.0, 200.0, 20.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-32", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 604.0, 79.0, 98.0, 20.0 ], - "text" : "prepend append" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-33", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "clear" ], - "patching_rect" : [ 675.0, 45.0, 43.0, 20.0 ], - "text" : "t clear" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-34", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 604.0, 45.0, 27.0, 20.0 ], - "text" : "iter" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-36", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 604.0, 12.0, 62.0, 20.0 ], - "text" : "route port" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-9", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 279.0, 361.0, 32.5, 18.0 ], - "text" : "65" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-6", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "bang", "" ], - "patching_rect" : [ 279.0, 332.0, 36.0, 20.0 ], - "text" : "sel 1" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-65", - "linecount" : 3, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 179.0, 404.0, 425.0, 48.0 ], - "text" : "trigger (or [t]) forces right-left conventions. All the drawing and processing will happen before Max requests new values. When this trigger fires, it sends an ASCII A to ask Arduino for new values." - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-64", - "linecount" : 2, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 117.0, 273.0, 135.0, 34.0 ], - "text" : "reinitializes the gates when turned on and off" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-63", - "linecount" : 5, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 400.0, 250.0, 233.0, 75.0 ], - "text" : "checks for the ascii value of \"A\" to begin cominucation. After initial communication is made, this block shuts down. A byte is sent back to the Arduino, indicating the patch is ready to receive information." - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-57", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "int" ], - "patching_rect" : [ 252.0, 273.0, 34.0, 20.0 ], - "text" : "t 2 0" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-55", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "patching_rect" : [ 325.0, 331.0, 32.5, 20.0 ], - "text" : "!- 1" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-54", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 325.0, 250.0, 54.0, 20.0 ], - "text" : "gate 1 1" - } - - } -, { - "box" : { - "id" : "obj-53", - "maxclass" : "toggle", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 325.0, 300.0, 20.0, 20.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-50", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 134.0, 328.0, 54.0, 20.0 ], - "text" : "gate 1 0" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-48", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "bang", "" ], - "patching_rect" : [ 325.0, 275.0, 43.0, 20.0 ], - "text" : "sel 65" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-35", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "" ], - "patching_rect" : [ 134.0, 399.0, 42.0, 21.0 ], - "text" : "t 65 l" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-1", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 475.0, 499.0, 37.0, 21.0 ], - "text" : "t" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-3", - "maxclass" : "number", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 407.0, 499.0, 56.0, 21.0 ] - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-18", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 350.0, 500.0, 37.0, 21.0 ], - "text" : "v" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-20", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 222.0, 500.0, 37.0, 21.0 ], - "text" : "x" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-22", - "maxclass" : "number", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 282.0, 500.0, 56.0, 21.0 ] - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-23", - "maxclass" : "number", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 157.0, 500.0, 55.0, 21.0 ] - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-29", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "int", "int", "int" ], - "patching_rect" : [ 157.0, 465.0, 269.0, 21.0 ], - "text" : "unpack 0 0 0" - } - - } -, { - "box" : { - "fontname" : "Verdana", - "fontsize" : 12.0, - "id" : "obj-31", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 134.0, 375.0, 71.0, 21.0 ], - "text" : "zl group 3" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-30", - "maxclass" : "newobj", - "numinlets" : 3, - "numoutlets" : 3, - "outlettype" : [ "bang", "bang", "" ], - "patching_rect" : [ 252.0, 65.0, 62.0, 20.0 ], - "text" : "select 0 1" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-26", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 330.0, 156.0, 206.0, 20.0 ], - "text" : "click here to close the serial port" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-27", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 355.0, 127.0, 227.0, 20.0 ], - "text" : "click here to open the selected serial port" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-21", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 282.0, 156.0, 39.0, 18.0 ], - "text" : "close" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-19", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 304.0, 127.0, 37.0, 18.0 ], - "text" : "open" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-2", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 375.0, 98.0, 207.0, 20.0 ], - "text" : "Click here to get a list of serial ports" - } - - } -, { - "box" : { - "id" : "obj-11", - "maxclass" : "toggle", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 169.0, 20.0, 22.0, 22.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-12", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "bang" ], - "patching_rect" : [ 169.0, 65.0, 65.0, 20.0 ], - "text" : "qmetro 10" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-13", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 324.0, 98.0, 36.0, 18.0 ], - "text" : "print" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-14", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "" ], - "patching_rect" : [ 169.0, 210.0, 155.0, 20.0 ], - "text" : "serial a 9600 @autoopen 0" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-15", - "linecount" : 2, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 18.0, 57.0, 142.0, 34.0 ], - "text" : "Read serial input buffer every 10 milliseconds" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-17", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 188.0, 20.0, 117.0, 20.0 ], - "text" : "Click to start" - } - - } -, { - "box" : { - "background" : 1, - "bgcolor" : [ 1.0, 0.788235, 0.470588, 1.0 ], - "border" : 0, - "bordercolor" : [ 0.0, 0.0, 0.0, 1.0 ], - "fontface" : 1, - "fontname" : "Arial", - "fontsize" : 13.0, - "hint" : "", - "id" : "obj-10", - "ignoreclick" : 1, - "maxclass" : "textbutton", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "", "", "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 270.0, 20.0, 20.0, 20.0 ], - "rounded" : 60.0, - "text" : "3", - "textcolor" : [ 0.34902, 0.34902, 0.34902, 1.0 ], - "textovercolor" : [ 0.2, 0.2, 0.2, 1.0 ] - } - - } -, { - "box" : { - "background" : 1, - "bgcolor" : [ 1.0, 0.788235, 0.470588, 1.0 ], - "border" : 0, - "bordercolor" : [ 0.0, 0.0, 0.0, 1.0 ], - "fontface" : 1, - "fontname" : "Arial", - "fontsize" : 13.0, - "hint" : "", - "id" : "obj-25", - "ignoreclick" : 1, - "maxclass" : "textbutton", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "", "", "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 706.0, 102.0, 20.0, 20.0 ], - "rounded" : 60.0, - "text" : "2", - "textcolor" : [ 0.34902, 0.34902, 0.34902, 1.0 ], - "textovercolor" : [ 0.2, 0.2, 0.2, 1.0 ] - } - - } -, { - "box" : { - "background" : 1, - "bgcolor" : [ 1.0, 0.788235, 0.470588, 1.0 ], - "border" : 0, - "bordercolor" : [ 0.0, 0.0, 0.0, 1.0 ], - "fontface" : 1, - "fontname" : "Arial", - "fontsize" : 13.0, - "hint" : "", - "id" : "obj-93", - "ignoreclick" : 1, - "maxclass" : "textbutton", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "", "", "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 568.0, 98.0, 20.0, 20.0 ], - "rounded" : 60.0, - "text" : "1", - "textcolor" : [ 0.34902, 0.34902, 0.34902, 1.0 ], - "textovercolor" : [ 0.2, 0.2, 0.2, 1.0 ] - } - - } - ], - "lines" : [ { - "patchline" : { - "destination" : [ "obj-12", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-11", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-30", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 178.5, 56.0, 261.5, 56.0 ], - "source" : [ "obj-11", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.168982, 0.8, 0.273315, 0.9 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 178.5, 147.0, 178.5, 147.0 ], - "source" : [ "obj-12", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.168982, 0.8, 0.273315, 0.9 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 333.5, 120.5, 178.5, 120.5 ], - "source" : [ "obj-13", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.004775, 0.8, 0.9 ], - "destination" : [ "obj-36", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 314.5, 231.0, 600.0, 231.0, 600.0, 9.0, 613.5, 9.0 ], - "source" : [ "obj-14", 1 ] - } - - } -, { - "patchline" : { - "color" : [ 0.740956, 0.137093, 0.8, 0.9 ], - "destination" : [ "obj-50", 1 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-14", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.771514, 0.155069, 0.8, 0.9 ], - "destination" : [ "obj-54", 1 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 178.5, 237.0, 369.5, 237.0 ], - "source" : [ "obj-14", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.168982, 0.8, 0.273315, 0.9 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 313.5, 151.5, 178.5, 151.5 ], - "source" : [ "obj-19", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.168982, 0.8, 0.273315, 0.9 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 291.5, 185.5, 178.5, 185.5 ], - "source" : [ "obj-21", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-39", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-22", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-5", 1 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-23", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.076581, 0.8, 0.10276, 0.9 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 704.5, 200.0, 178.5, 200.0 ], - "source" : [ "obj-28", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-22", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-29", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-23", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-29", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-3", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-29", 2 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-16", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-3", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-5", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-3", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.0, 0.0, 0.9 ], - "destination" : [ "obj-19", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 283.0, 111.0, 313.5, 111.0 ], - "source" : [ "obj-30", 1 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.0, 0.0, 0.9 ], - "destination" : [ "obj-21", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 261.5, 135.0, 291.5, 135.0 ], - "source" : [ "obj-30", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.0, 0.0, 0.9 ], - "destination" : [ "obj-57", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 261.5, 178.5, 261.5, 178.5 ], - "source" : [ "obj-30", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-35", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-31", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-4", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-32", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-4", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-33", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-32", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-34", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.168982, 0.8, 0.273315, 0.9 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 143.5, 437.0, 107.0, 437.0, 107.0, 195.0, 178.5, 195.0 ], - "source" : [ "obj-35", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-29", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-35", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-33", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-36", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-34", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-36", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-38", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-39", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-40", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-39", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-28", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-4", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-16", 1 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-40", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-42", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-40", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-31", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-41", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-53", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-48", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-41", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-50", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-50", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 334.5, 321.0, 143.5, 321.0 ], - "source" : [ "obj-53", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-55", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-53", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-6", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 334.5, 326.5, 288.5, 326.5 ], - "source" : [ "obj-53", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-48", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-54", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-54", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 334.5, 354.0, 393.0, 354.0, 393.0, 246.0, 334.5, 246.0 ], - "source" : [ "obj-55", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-41", 1 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-57", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-53", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 276.5, 296.0, 334.5, 296.0 ], - "source" : [ "obj-57", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-9", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-6", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.0, 0.0, 0.9 ], - "destination" : [ "obj-13", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 364.5, 87.0, 336.0, 87.0, 336.0, 93.0, 333.5, 93.0 ], - "source" : [ "obj-7", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.0, 0.0, 0.0, 1.0 ], - "destination" : [ "obj-21", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 432.5, 92.0, 309.0, 92.0, 309.0, 92.0, 291.5, 92.0 ], - "source" : [ "obj-8", 0 ] - } - - } -, { - "patchline" : { - "color" : [ 0.168982, 0.8, 0.273315, 0.9 ], - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-9", 0 ] - } - - } - ], - "dependency_cache" : [ ] - } - -} diff --git a/software/apps/Motion/Graph2/Graph2.ino b/software/apps/Motion/Graph2/Graph2.ino deleted file mode 100644 index edd86b6..0000000 --- a/software/apps/Motion/Graph2/Graph2.ino +++ /dev/null @@ -1,28 +0,0 @@ -int x, v, t; //position velocity time -#define n 10 -int xtab[n]; //table of x -int i; // index for table - -void setup() -{ - // start serial port at 9600 bps: - Serial.begin(9600); -} - -void loop() -{ - // if we get a valid byte, read analog ins: - if (Serial.available() > 0) { - x = analogRead(A0)/4; //just for this test - xtab[i] = x; //put it in array of x - i = i + 1; //index to last x (9 times ago) - if(i>9)i=0; //increment index - v = x - xtab[i]; //difference x vs old x - t = (t+1)%256; - // send sensor values: - Serial.write(x); // sends one byte [0-255] - Serial.write(v+128); - Serial.write(t); - } -} - diff --git a/software/apps/Motion/GraphArduinoA0.maxpat b/software/apps/Motion/GraphArduinoA0.maxpat deleted file mode 100644 index 7698fe6..0000000 --- a/software/apps/Motion/GraphArduinoA0.maxpat +++ /dev/null @@ -1,576 +0,0 @@ -{ - "patcher" : { - "fileversion" : 1, - "appversion" : { - "major" : 6, - "minor" : 0, - "revision" : 5 - } -, - "rect" : [ 50.0, 94.0, 693.0, 652.0 ], - "bglocked" : 0, - "openinpresentation" : 0, - "default_fontsize" : 12.0, - "default_fontface" : 0, - "default_fontname" : "Arial", - "gridonopen" : 0, - "gridsize" : [ 15.0, 15.0 ], - "gridsnaponopen" : 0, - "statusbarvisible" : 2, - "toolbarvisible" : 1, - "boxanimatetime" : 200, - "imprint" : 0, - "enablehscroll" : 1, - "enablevscroll" : 1, - "devicewidth" : 0.0, - "description" : "", - "digest" : "", - "tags" : "", - "boxes" : [ { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-23", - "maxclass" : "flonum", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "float", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 561.0, 378.0, 50.0, 20.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-20", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "float" ], - "patching_rect" : [ 519.0, 429.0, 44.0, 20.0 ], - "text" : "+ 500." - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-18", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "float" ], - "patching_rect" : [ 418.0, 414.0, 42.0, 20.0 ], - "text" : "* 100." - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-32", - "linecount" : 10, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 479.0, 6.0, 344.0, 145.0 ], - "text" : "Graph\n\nThis patch takes a string, containing ASCII formatted number from 0 to 1023, with a carriage return and linefeed at the end. It converts the string to an integer and graphs it.\n\ncreated 2006\nby David A. Mellis\nmodified 14 Apr 2009\nby Scott Fitzgerald and Tom Igoe" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-30", - "maxclass" : "newobj", - "numinlets" : 3, - "numoutlets" : 3, - "outlettype" : [ "bang", "bang", "" ], - "patching_rect" : [ 327.0, 80.0, 62.0, 20.0 ], - "text" : "select 0 1" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-26", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 412.0, 231.0, 206.0, 20.0 ], - "text" : "click here to close the serial port" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-27", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 412.0, 205.0, 206.0, 20.0 ], - "text" : "click here to open the serial port" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-21", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 327.0, 231.0, 39.0, 18.0 ], - "text" : "close" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-19", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 349.0, 205.0, 41.0, 18.0 ], - "text" : "port a" - } - - } -, { - "box" : { - "bgcolor" : [ 0.231373, 0.713726, 1.0, 1.0 ], - "candicane2" : [ 0.145098, 0.203922, 0.356863, 1.0 ], - "candicane3" : [ 0.290196, 0.411765, 0.713726, 1.0 ], - "candicane4" : [ 0.439216, 0.619608, 0.070588, 1.0 ], - "candicane5" : [ 0.584314, 0.827451, 0.431373, 1.0 ], - "candicane6" : [ 0.733333, 0.035294, 0.788235, 1.0 ], - "candicane7" : [ 0.878431, 0.243137, 0.145098, 1.0 ], - "candicane8" : [ 0.027451, 0.447059, 0.501961, 1.0 ], - "contdata" : 1, - "id" : "obj-1", - "maxclass" : "multislider", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "parameter_enable" : 0, - "patching_rect" : [ 302.0, 450.0, 246.0, 167.0 ], - "peakcolor" : [ 0.498039, 0.498039, 0.498039, 1.0 ], - "setminmax" : [ 0.0, 1023.0 ], - "setstyle" : 3, - "settype" : 0, - "slidercolor" : [ 0.066667, 0.058824, 0.776471, 1.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-2", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 412.0, 179.0, 207.0, 20.0 ], - "text" : "Click here to get a list of serial ports" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-3", - "linecount" : 2, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 153.0, 409.0, 138.0, 34.0 ], - "text" : "Here's the number from Arduino's analog input" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-4", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 379.0, 378.0, 147.0, 20.0 ], - "text" : "Convert ASCII to symbol" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-5", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 379.0, 355.0, 147.0, 20.0 ], - "text" : "Convert integer to ASCII" - } - - } -, { - "box" : { - "bgcolor" : [ 0.866667, 0.866667, 0.866667, 1.0 ], - "fontname" : "Arial", - "fontsize" : 12.0, - "htextcolor" : [ 0.870588, 0.870588, 0.870588, 1.0 ], - "id" : "obj-6", - "maxclass" : "number", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 302.0, 414.0, 37.0, 20.0 ], - "triscale" : 0.9 - } - - } -, { - "box" : { - "color" : [ 1.0, 0.890196, 0.090196, 1.0 ], - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-7", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 302.0, 378.0, 74.0, 20.0 ], - "text" : "fromsymbol" - } - - } -, { - "box" : { - "color" : [ 1.0, 0.890196, 0.090196, 1.0 ], - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-8", - "maxclass" : "newobj", - "numinlets" : 3, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "patching_rect" : [ 302.0, 355.0, 46.0, 20.0 ], - "text" : "itoa" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-9", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 302.0, 332.0, 64.0, 20.0 ], - "text" : "zl group 4" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-10", - "maxclass" : "newobj", - "numinlets" : 3, - "numoutlets" : 3, - "outlettype" : [ "bang", "bang", "" ], - "patching_rect" : [ 244.0, 281.0, 77.0, 20.0 ], - "text" : "select 10 13" - } - - } -, { - "box" : { - "id" : "obj-11", - "maxclass" : "toggle", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 244.0, 43.0, 15.0, 15.0 ] - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-12", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "bang" ], - "patching_rect" : [ 244.0, 80.0, 65.0, 20.0 ], - "text" : "qmetro 10" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-13", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 369.0, 179.0, 36.0, 18.0 ], - "text" : "print" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-14", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "int", "" ], - "patching_rect" : [ 244.0, 255.0, 84.0, 20.0 ], - "text" : "serial a 9600" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-15", - "linecount" : 2, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 53.0, 72.0, 185.0, 34.0 ], - "text" : "Read serial input buffer every 10 milliseconds" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-16", - "linecount" : 3, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 332.0, 269.0, 320.0, 48.0 ], - "text" : "If you get newline (ASCII 10), send the list. If you get return (ASCII 13) do nothing. Any other value, add to the list" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-17", - "linecount" : 2, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 271.0, 32.0, 199.0, 34.0 ], - "text" : "Click to open/close serial port and start/stop patch" - } - - } - ], - "lines" : [ { - "patchline" : { - "destination" : [ "obj-9", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 311.5, 320.0, 311.5, 320.0 ], - "source" : [ "obj-10", 2 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-9", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 253.5, 308.0, 311.5, 308.0 ], - "source" : [ "obj-10", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-12", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-11", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-30", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 253.0, 71.0, 336.5, 71.0 ], - "source" : [ "obj-11", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-12", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 378.5, 200.5, 253.5, 200.5 ], - "source" : [ "obj-13", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-10", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-14", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-20", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-18", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 358.5, 228.5, 253.5, 228.5 ], - "source" : [ "obj-19", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-23", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-20", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-14", 0 ], - "disabled" : 0, - "hidden" : 0, - "midpoints" : [ 336.5, 251.5, 253.5, 251.5 ], - "source" : [ "obj-21", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-1", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-23", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-19", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-30", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-21", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-30", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-1", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-6", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-18", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-7", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-7", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-8", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-8", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-9", 0 ] - } - - } - ], - "dependency_cache" : [ ] - } - -} diff --git a/software/apps/Motion/HelloApps.rtf b/software/apps/Motion/HelloApps.rtf deleted file mode 100644 index 058343b..0000000 --- a/software/apps/Motion/HelloApps.rtf +++ /dev/null @@ -1,26 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf510 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\margl1440\margr1440\vieww10800\viewh8400\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural - -\f0\fs24 \cf0 "Hello, World" Apps\ -\ -Wall (spring with and without damping) - how stiff without instability? - does damping help?\ -Center (full range of force and position) - \ -\ -Music -\ -position -> pitch (linear, non-linear)\ -gain -> FSR (second device?)\ -\ -Motor -\ -timed (open-loop) - "tick" "rumble" "\ - ramp - up,stay,dn,stay, etc.\ - rhythm - march, waltz, \'85\ -position - table/function (no time dependence) [ is this part of Motion?]\ -\ -Motion - \ -spring (position)\ -damping (velocity)\ -inertia (acceleration)\ -} \ No newline at end of file diff --git a/software/apps/Motion/Motion0/Motion0.ino b/software/apps/Motion/Motion0/Motion0.ino deleted file mode 100644 index 8677ff3..0000000 --- a/software/apps/Motion/Motion0/Motion0.ino +++ /dev/null @@ -1,55 +0,0 @@ -#include - -/* - -Two motion objects are available from the MMM Motions library -(1) MotionA -(2) MotionB - -MOTION { - MOTIONA , - MOTIONB1 -}; - -Each objects needs intialisation with a specific input -from which ADC reading will be performed. - -Users may choose and identify inputs aa INPUT[A0, ... ,A7]. -ex: MotionA.init(INPOUTA5); - -INPUT { - INPUTA0, - INPUTA1, - INPUTA2, - INPUTA3, - INPUTA4, - INPUTA5, - INPUTA6, - INPUTA7 -} - -All calculation of physics (position, velocity and acceleration) -are computed internally usign interrupts and timers. To access -such information, user may call getPosition(), getVelocity() -and getAcceleration() respectively on a initialised Motion object. - -int getPosition(); -float getVelocity(); -float getAcceleration(); - -*/ - -void setup() { - MotionA.init(INPUTA0); - Serial.begin(9600); -} - -void loop() { - Serial.print("position: "); Serial.println(MotionA.getPosition()); - Serial.print("velocity: "); Serial.println(MotionA.getVelocity()); - Serial.print("accel: "); Serial.println(MotionA.getAcceleration()); - Serial.println("-------"); - delay(100); -} - - diff --git a/software/apps/Motion/Oscilloscope/Oscilloscope.pde b/software/apps/Motion/Oscillator/Oscilloscope/Oscilloscope.pde similarity index 100% rename from software/apps/Motion/Oscilloscope/Oscilloscope.pde rename to software/apps/Motion/Oscillator/Oscilloscope/Oscilloscope.pde diff --git a/software/apps/Motion/Oscilloscope/Protocol.pde b/software/apps/Motion/Oscillator/Oscilloscope/Protocol.pde similarity index 100% rename from software/apps/Motion/Oscilloscope/Protocol.pde rename to software/apps/Motion/Oscillator/Oscilloscope/Protocol.pde diff --git a/software/apps/Motion/Oscilloscope/ScopePlot.pde b/software/apps/Motion/Oscillator/Oscilloscope/ScopePlot.pde similarity index 100% rename from software/apps/Motion/Oscilloscope/ScopePlot.pde rename to software/apps/Motion/Oscillator/Oscilloscope/ScopePlot.pde diff --git a/software/apps/Motion/OscilloscopeArduino/OscilloscopeArduino.ino b/software/apps/Motion/Oscillator/OscilloscopeArduino/OscilloscopeArduino.ino similarity index 100% rename from software/apps/Motion/OscilloscopeArduino/OscilloscopeArduino.ino rename to software/apps/Motion/Oscillator/OscilloscopeArduino/OscilloscopeArduino.ino diff --git a/software/apps/Motion/Pendulum/Pendulum.ino b/software/apps/Motion/Pendulum/Pendulum.ino deleted file mode 100644 index 5506c7e..0000000 --- a/software/apps/Motion/Pendulum/Pendulum.ino +++ /dev/null @@ -1,62 +0,0 @@ -// "Pendulum" - spring-mass oscillator -#include -#include - -byte incomingByte; - -void setup() -{ - // init MotionA & MotorA - MotionA.init(INPUTA0); - MotorA.init(); - - // provide MotionA with initial physics constants - MotionA.k = 0.2f; // spring - MotionA.m = 0.3f; // mass - MotionA.d = 0.02f; // damping - - Serial.begin(9600); -} - -void loop(){ - - if(MotionA.F < 0) MotorA.direction(FORWARD); - else MotorA.direction(BACKWARD); - - float t = abs(MotionA.F); - MotorA.torque(t); - - if (Serial.available() > 0) { - incomingByte = Serial.read(); - if(incomingByte == '1'){ - MotionA.m = MotionA.m * 1.1; - Serial.print("m: "); - Serial.println(MotionA.m); - } - else if(incomingByte == '!'){ - MotionA.m = MotionA.m / 1.1; - Serial.print("m: "); - Serial.println(MotionA.m); - } - else if(incomingByte == '2'){ - MotionA.k = MotionA.k * 1.1; - Serial.print("k: "); - Serial.println(MotionA.k); - } - else if(incomingByte == '@'){ - MotionA.k = MotionA.k / 1.1; - Serial.print("k: "); - Serial.println(MotionA.k); - } - else if(incomingByte == '3'){ - MotionA.d = MotionA.d * 1.1; - Serial.print("d: "); - Serial.println(MotionA.d); - } - else if(incomingByte == '#'){ - MotionA.d = MotionA.d / 1.1; - Serial.print("d: "); - Serial.println(MotionA.d); - } - } -} diff --git a/software/apps/Motion/PendulumBillsLatest/PendulumBillsLatest.ino b/software/apps/Motion/PendulumBillsLatest/PendulumBillsLatest.ino deleted file mode 100644 index 0fac5f7..0000000 --- a/software/apps/Motion/PendulumBillsLatest/PendulumBillsLatest.ino +++ /dev/null @@ -1,68 +0,0 @@ -// "Pendulum" - spring-mass oscillator -// Spring-Mass oscillator (no damping) - -//#include -#include -float dt = .005; //time per cycle -float m = 4.0; //time constant was .002 -float k = 1.0; // spring constant was .15 -float xf,vf,ff; // floating point versions of pendulum x and v and force -int x; // input from analogRead(); -int f; // integer version of force -int duty; // abs(f) -byte c=0; //counts up until 0 then prints - -byte incomingByte; - - -void setup() -{ - MotorA.init(); //initializes Timer1, pinModes - Serial.begin(9600); - //initialize position (xf), velocity (vf), force (ff) - x = analogRead(A0) - 512; //middle of 0-1-23 range - xf = x; - vf = 0.0; - ff = 0.0; - -} - -void loop(){ - x = analogRead(0) - 512; // position [0-1024] - ff = k*(x - xf); // spring - vf = vf + (ff/m)*dt; // integrate F/m to get velocity - xf = xf + vf*dt; // integrate velocity to get position - - duty = abs(ff); - duty = min(duty,512); //Motor has max torque of 512 - - - MotorA.torque(duty); - if(ff>0)MotorA.direction(FORWARD); - else MotorA.direction(BACKWARD); - -if (c++ == 0){ - Serial.println(xf); -} -/* -if (Serial.available() > 0) { - incomingByte = Serial.read(); - if(incomingByte == '\''){ - tf = tf * 1.1; - Serial.println(tf); - } - if(incomingByte == ';'){ - tf = tf / 1.1; - Serial.println(tf); - } - if(incomingByte == '.'){ - kf = kf / 1.1; - Serial.println(tf); - } - if(incomingByte == '/'){ - kf = kf * 1.1; - Serial.println(tf); - } - } - */ -} diff --git a/software/apps/Motion/PendulumDampedBV/PendulumDampedBV.ino b/software/apps/Motion/PendulumDampedBV/PendulumDampedBV.ino deleted file mode 100644 index 33abb70..0000000 --- a/software/apps/Motion/PendulumDampedBV/PendulumDampedBV.ino +++ /dev/null @@ -1,85 +0,0 @@ -// Damped Spring-Mass Oscillator -// BV 24Jan13 - -#include -int Fout, Xin, duty; - -// mass sring damper model -float m = 4.0; -float k = 1.0; -float b = 0.0; -float dT = .005; -float X, V, F; // model parameters (2nd-order oscil) - -byte c=0; //counts up until 0 then prints - -byte incomingByte; - -void setup(){ - Serial.begin(9600); - MotorA.init(); // initializes Timer1, pinModes - Xin = analogRead(A0) - 512; //middle of 0-1023 range - // initialize model variables - X = Xin; - V = 0.0; - F = 0.0; -} - -void loop(){ - Xin = analogRead(A0) - 512; - F = k*(Xin - X) - b*V; //spring and damper - V += (F/m) * dT; - X += V * dT; - - duty = abs(Fout); - duty = min(duty,512); - - MotorA.torque(duty); - if(Fout>0)MotorA.direction(FORWARD); - else MotorA.direction(BACKWARD); - -if (c++ == 0){ - Serial.println(X); -} -/* -if (Serial.available() > 0) { - incomingByte = Serial.read(); - if(incomingByte == '}''){ - dT = dT * 1.1; - Serial.println(dT); - } - if(incomingByte == '\'){ shift \ - dT = dT / 1.1; - Serial.println(dT); - } - if(incomingByte == '|'){ - k = k / 1.1; - Serial.println(k); - } - if(incomingByte == '}'){ //shift ] - k = k * 1.1; - Serial.println(k); - } - if(incomingByte == '['){ - b = b / 1.1; - Serial.println(b); - } - if(incomingByte == '{'){ //shift [ - b = b * 1.1; - Serial.println(b); - } - if(incomingByte == '['){ - m = m / 1.1; - Serial.println(m); - } - if(incomingBmyte == '{'){ //shift [ - m = m * 1.1; - Serial.println(m); - } - } - } - */ -} - - - diff --git a/software/apps/Motion/PendulumMM_2/PendulumMM_2.ino b/software/apps/Motion/PendulumMM_2/PendulumMM_2.ino deleted file mode 100644 index 4f661d1..0000000 --- a/software/apps/Motion/PendulumMM_2/PendulumMM_2.ino +++ /dev/null @@ -1,80 +0,0 @@ -// "Pendulum" - spring-mass oscillator -// - -#include -#include -float tf = 0.002; //time constant was .002 -float kf = 0.2; // spring constant was .15 -float xf,vf,ff; // floating point versions of pendulum x and v and force -int x, f; //int versions of position (from a/d) and force (to Pwm) -int duty; // abs(f) -byte c=0; //counts up until 0 then prints - -float m = 0.3; -float k = 0.01; - -float damp = 0.09; - -byte incomingByte; - - - -void setup() -{ - //Timer1.initialize(64); //64 microsecond period - MotorA.torque(100); //initializes Timer1, pinModes - Serial.begin(9600); -} - -void loop(){ - x = analogRead(0); // position [0-1024] - ff = kf*(x - xf); // spring - f = max(ff,-1024); - f = min(f,1024); - // if(f>0)digitalWrite(DIRA,HIGH); - // else digitalWrite(DIRA,LOW); - duty = abs(f); - // Timer1.pwm(9,duty); - MotorA.torque(duty); - if(f>0)MotorA.direction(FORWARD); - else MotorA.direction(BACKWARD); - - // update (integrate) floating versions of xf and vf - //integrate twice tf is deltaT/mass; - vf += ff*tf; - xf += vf*tf; - - if(c++==0) // when c gets to 255 it's next == 0 and sends data - { - Serial.print(x); - Serial.print(" "); - Serial.print(xf); - Serial.print(" "); - Serial.println(ff); - } - -if (c++ == 0)Serial.println(x); // - if (Serial.available() > 0) { - //Serial.print(v); - //Serial.print(" "); - //Serial.println(x); - incomingByte = Serial.read(); - //Serial.write(incomingByte); - if(incomingByte == '\''){ - m = m * 1.1; - Serial.println(m); - } - if(incomingByte == ';'){ - m = m / 1.1; - Serial.println(m); - } - if(incomingByte == '.'){ - k = k / 1.1; - Serial.println(k); - } - if(incomingByte == '/'){ - k = k * 1.1; - Serial.println(k); - } - } -} diff --git a/software/apps/Motion/ProtocolBVmotor/ProtocolBVmotor.ino b/software/apps/Motion/ProtocolBVmotor/ProtocolBVmotor.ino deleted file mode 100644 index b360543..0000000 --- a/software/apps/Motion/ProtocolBVmotor/ProtocolBVmotor.ino +++ /dev/null @@ -1,72 +0,0 @@ -#include -#include - -char buf[16] = ""; - -char b = 'x'; -String inputString = ""; -boolean stringComplete = false; - -float k, m, d; -int duty; - -void setup() { - - MotorA.init(); - - MotionA.init(INPUTA0); - - MotionA.k = 0.2f; // spring - MotionA.m = 1.0f; // mass - MotionA.d = 0.02f; // damping - - Serial.begin(9600); -} - -void loop() { - //send force out - if (MotionA.F > 0) MotorA.direction(FORWARD); - else MotorA.direction(BACKWARD); - duty = abs(MotionA.F); - duty = min(512,duty); - MotorA.torque(duty); - - //send data to be plotted by Processing "plotter" - sprintf(buf, "%d %d %d %d", (int)MotionA.F, (int)MotionA.A, (int)MotionA.V, (int)MotionA.X); - Serial.println(buf); - - delay(10); - - if(stringComplete) { - if(b == 'k') { - MotionA.k = convertToFloat(inputString); - } else if(b == 'm') { - MotionA.m = convertToFloat(inputString); - } else if(b == 'd') { - MotionA.d = convertToFloat(inputString); - } - b = 'x'; - stringComplete = false; - inputString = ""; - } -} - -void serialEvent() { - while (Serial.available()) { - char inChar = (char)Serial.read(); - if(inChar == 'k' || inChar == 'm' || inChar == 'd') { - b = inChar; - } else { - if (inChar == ';') { - stringComplete = true; - } else - inputString += inChar; - } - } -} - -float convertToFloat(String str) { - char buf[16] = ""; - str.toCharArray(buf, str.length() + 1); - return atof(buf); -} diff --git a/software/apps/M&MStudioBV/Pulse_Beat/Pulse_Beat.ino b/software/apps/Motion/Pulse_Beat/Pulse_Beat.ino similarity index 100% rename from software/apps/M&MStudioBV/Pulse_Beat/Pulse_Beat.ino rename to software/apps/Motion/Pulse_Beat/Pulse_Beat.ino diff --git a/software/apps/Motion/SandFSR/SandFSR.ino b/software/apps/Motion/SandFSR/SandFSR.ino deleted file mode 100644 index 5a7f522..0000000 --- a/software/apps/Motion/SandFSR/SandFSR.ino +++ /dev/null @@ -1,26 +0,0 @@ -#include - -float pos, fin, finmax, fout; -byte c; // used as a counter from 0 to 255 -int duty; - -void setup(){ - digitalWrite(A4,HIGH); - digitalWrite(A5,LOW); - pinMode(A4, INPUT); - pinMode(A5, OUTPUT); - //MotorB._period(32); -} - -void loop(){ - fin += .01*(analogRead(A4)-fin); - fout = 0.5*fin*(1024+random(1024)); - duty = min(1024,fout); - duty = abs(duty); - //duty = min(duty,1024); - MotorB.torque(duty); - if(fout<0)MotorB.direction(FORWARD); - else MotorB.direction(BACKWARD); - } - - diff --git a/software/apps/Motor/A_pos_force_test/A_pos_force_test.ino b/software/apps/Motor/A_pos_force_test/A_pos_force_test.ino deleted file mode 100644 index cb96863..0000000 --- a/software/apps/Motor/A_pos_force_test/A_pos_force_test.ino +++ /dev/null @@ -1,24 +0,0 @@ -//position and force reporting -//sends A0 (MotorA), A1 (ForceA) -//sends A3 (MotorB), A4 (ForceB) -// to Serial Monitor - -// should FSR set-up be in MMM lib? -// Bill Verplank 24Jan13 - -void setup() -{ - Serial.begin(9600); - //set up for FSR A1 to D4 - pinMode(A1,INPUT); - pinMode(4,OUTPUT); - digitalWrite(4,LOW); - digitalWrite(A1,HIGH); //internal pull-up -} - -void loop() -{ - Serial.print(analogRead(A0)); //positionA - Serial.print(" "); - Serial.println(analogRead(A1)); //forceA -} diff --git a/software/apps/Motor/Motor.ino b/software/apps/Motor/Motor.ino deleted file mode 100644 index 3f362fc..0000000 --- a/software/apps/Motor/Motor.ino +++ /dev/null @@ -1,22 +0,0 @@ -//#include -//BV 24Jan13 - -#include - -void setup() -{ - MotorA.init(); - MotorA.torque(500); //512 is max torque - -} - -void loop() -{ - - MotorA.direction(FORWARD); - delay(1000); - MotorA.direction(BACKWARD); - delay(1000); - -} - diff --git a/software/apps/Motor/motortest/motortest.ino b/software/apps/Motor/motortest/motortest.ino deleted file mode 100644 index 4fc4dc1..0000000 --- a/software/apps/Motor/motortest/motortest.ino +++ /dev/null @@ -1,23 +0,0 @@ -//motortest -//.5 sec forward, .5 sec back - -#include - -int led = 13; - -void setup() -{ - MotorA.init(); - MotorA.torque(511); //what is max torque? - pinMode(13, OUTPUT); -} - -void loop() -{ - MotorA.direction(FORWARD); - digitalWrite(led,HIGH); - delay(500); - MotorA.direction(BACKWARD); - digitalWrite(led,LOW); - delay(500); -} diff --git a/software/apps/Motor/pos_FSR_AB_test/pos_FSR_AB_test.ino b/software/apps/Motor/pos_FSR_AB_test/pos_FSR_AB_test.ino deleted file mode 100644 index 22a3294..0000000 --- a/software/apps/Motor/pos_FSR_AB_test/pos_FSR_AB_test.ino +++ /dev/null @@ -1,30 +0,0 @@ -//position and force reporting -//sends A0 (MotorA), A1 (ForceA) -//sends A3 (MotorB), A4 (ForceB) -// to Serial Monitor - -void setup() -{ - Serial.begin(9600); - //set up for FSR A1 to D4 - pinMode(A1,INPUT); - pinMode(4,OUTPUT); - digitalWrite(4,LOW); - digitalWrite(A1,HIGH); //internal pull-up - //set up for FSR A4 to D5 - pinMode(A4,INPUT); - pinMode(5,OUTPUT); - digitalWrite(5,LOW); - digitalWrite(A4,HIGH); //internal pull-up -} - -void loop() -{ - Serial.print(analogRead(A0)); //positionA - Serial.print(" "); - Serial.print(analogRead(A1)); //positionA - Serial.print(" "); - Serial.print(analogRead(A3)); //positionA - Serial.print(" "); - Serial.println(analogRead(A4)); //forceA -} diff --git a/software/apps/Motor/postest/postest.ino b/software/apps/Motor/postest/postest.ino deleted file mode 100644 index 2b85c93..0000000 --- a/software/apps/Motor/postest/postest.ino +++ /dev/null @@ -1,21 +0,0 @@ -//position and force reporting -//sends A0 (MotorA), A1 (ForceA) -//sends A3 (MotorB), A4 (ForceB) -// to Serial Monitor - -void setup() -{ - Serial.begin(9600); - //set up for FSR A1 to D4 - pinMode(A1,INPUT); - pinMode(4,OUTPUT); - digitalWrite(4,LOW); - digitalWrite(A1,HIGH); //internal pull-up -} - -void loop() -{ - Serial.print(analogRead(A0)); //positionA - Serial.print(" "); - Serial.println(analogRead(A1)); //forceA -}