• blogHome
  • about
  • projects
  • writing
  • bio
  • archives
  • >>categories
  • Archive for the ‘ASM’ Category

    update

    Sunday, July 6th, 2008

    for

    >>partyWall

    ASM06_Arduino meets Processing…visualizing Potentiometer values

    Thursday, March 6th, 2008

    For dealing explicitly with the complexity of sound input, it is effective to visualize the data in processing. Here are the steps I made for letting Arduino talk to Processing.

    refer to
    ->> Processing Serial Library
    ->> Arduino Play Ground / Arduino meets Processing / Potentiometer




    [step1]

    ASM06_001AP-potValues

    It is a potentiometer value that has to be visualized here in its processing code.
    When the pot knob is turned, the incoming value gradually changes. (
    >>a variable resistor)

    >> Arduino Code
    >> Processing Code


    • import processing.serial.*;
    • Serial myPort;
    • PFont myFont;
    • String inString; // Input string from serial port:
    • int lf = 10; // ASCII linefeed
    • int value = 0;
    • int valNorm = 0;
    • String buf="";
    • int xpos = 0;
    • void setup() {
    • // if(inString==null)inString="100";
    • size(460,100);
    • myFont = loadFont("CourierNewPSMT-18.vlw");
    • println(Serial.list());
    • myPort = new Serial(this, "COM2", 14400);
    • myPort.bufferUntil(lf);
    • frameRate(20);
    • }
    • void draw() {
    • while(myPort.available() > 0){
    • value = myPort.read();
    • println("value "+value);
    • serialEvent(value);
    • }
    • background(255);
    • uploading();
    • fill(0);
    • textFont(myFont, 18);
    • text("pot receives; " + valNorm,10,35); //"received: " + inString
    • }
    • void serialEvent(int serial){ // if serial event is not a line break
    • if(serial!=10) {
    • buf += char(serial); // add event to buffer
    • println("buf"+buf);
    • }
    • else {
    • valNorm = int(buf); // if serial is line break set valNorm to buff and clear it
    • println("valNorm---"+valNorm);
    • buf="";
    • }
    • // convert valNorm to xpos
    • // xpos = constrain ( (1/width ) ,0, width-12);
    • // if(output) println("xpos: "+xpos);
    • }
    • void uploading(){
    • noStroke();
    • fill(255, 0, 0);
    • rect((valNorm*0.44)+1023/width, 60,4,40 );
    • }

    1. valNorm-100)*(width+100 []

    ASM05_analogIn+Output2

    Saturday, February 23rd, 2008

    just to understand how complex our physical reality is.
    ASM05_003_photoresistor2 from chie fuyuki on Vimeo.

    ASM05_analogIn+Output1

    Wednesday, February 20th, 2008


    ASM05_002_photoResistor from chie fuyuki on Vimeo.

    ASM04-001-3_Digital In+Output2

    Saturday, February 16th, 2008

    ASM04-001-3_diagram, originally uploaded by thetarbre.


    ->>refer to

    • http://www.ladyada.net/learn/arduino/lesson3.html

    ASM03_Digital In+Output1

    Thursday, February 7th, 2008

    diagram_A_001_Digital In+Output, originally uploaded by thetarbre.


    ->>see
    prototype on vimeo
    ->>see code+diagram of A_001_Digital In+Output on flicker

    ...also made a first trial of soldering!

    ->>refer to

    • http://www.ladyada.net/learn/arduino/lesson3.html
    • http://www.arduino.cc/en/Booklet/HomePage