• galvanicdude

    Hello,
    Although there seems to be endless information on the internet on using an Arduino board with Pure-Data, I haven't found any info that will make it work for me... So, I'm seeking for some help.

    So I'm trying to use my Arduino board to read galvanic skin response. I've got that nearly working. Where I'm having trouble is getting the data into PD in the correct format.
    Here is the code I have for my Arduino:
    // Arduino Code
    int sensorPin = A0;
    int sensorValue = 0;

    void setup() {
    Serial.begin(9600);
    }

    void loop() {
    float conductance = getVoltage(sensorPin);
    Serial.println(conductance);
    Serial.write(conductance);
    delay(1000);
    }

    float getVoltage(int pin){
    return (analogRead(pin));
    }
    // End Arduino Code.

    I'm using the comport object in PD. And I am receiving Data which is analogous to what I'm doing on the board. But I can't understand exactly what it is reading. Here is the link to my PD patch: http://www.sendspace.com/file/n81jlj
    So Firstly, the Numbers keep jumping around, and secondly I'm not sure what those numbers are. What I'd like them to be is the individual analog inputs of my Arduino. But they clearly aren't as they all change when I play around with my arduino board. Also they seem to range between 0 and 255, whereas my Arduino reads the data as 10bits...

    Any sugestions!?
    Thank you,
    Niko.

    posted in I/O hardware diyread more
  • galvanicdude

    Hi,
    Thank you for your help, I resorted as you suggested to use someone else patch rather than try and do it myself. I'm using the Simple Message System which seems to work quite well.

    :)

    posted in I/O hardware diyread more
  • galvanicdude

    @danijel said:

    I see a reference to Onyx Ashanti in your code - are you Onyx? :)

    Haha no, just quick notes I took while talking to a friend. :)

    posted in I/O hardware diyread more
  • galvanicdude

    @danijel said:

    @galvanicdude said:

    But they clearly aren't as they all change when I play around with my arduino board.

    How do you 'play' with it? If you're touching the board with your hands, the values will jump around because of your bio-electricity.

    Well not if its grounded properly. I've got fairly steady values in arduino-compiler's serial monitor.
    The values jump around in PD because I'm receiving the data in bursts. So when I just link the 'comport' object to a simple number object I get a random value from that burst. Where I'm having trouble is single out the only value I want.

    The idea is less to play the board with your skin moisture, but to set up a biofeedback loop: informing your conscious mind through sound (generated by PD) of innate/unconscious behavior of your body!

    posted in I/O hardware diyread more
  • galvanicdude

    I have, but I'm not sure how to do it. When I follow instructions it doesn't seem to work... I'm giving it an other try. :)

    posted in I/O hardware diyread more

Internal error.

Oops! Looks like something went wrong!