slow analog inputs arduino diecimila - linux

...happening with my board with a couple of distros (Xandros/Puppy) on two different laptops, values are being read from the analog inputs very very slowly - seems to be a linux issue as works fine with XP.
Tried several different baud rates (same on board code and software). Aim is to use it with Pure Data PD.

Any help appreciated, feels like I'm missing something obvious...

What's the Arduino code look like? What program are you using to read the values?

here’s the code:

#include <SimpleMessageSystem.h>

/* Analog/Digital inputs to PD trigger


  • send serial values to PD to trigger something
    */

char firstChar;
char secondChar;

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

void loop()
{

if (messageBuild()) { // Checks to see if the message is complete
firstChar = messageGetChar(); { // Gets the first word as a character

if (firstChar = ‘r’) { // Checking for the character ‘r’
secondChar = messageGetChar(); // Gets the next word as a character
if (firstChar = ‘d’) // The next character has to be ‘d’ to continue
messageSendChar(‘d’); // Echo what is being read

for (int i=0;i<=5;i++) {
messageSendInt(analogRead(i)); // Read analog pins 0 to 5
}

for (int m=2;m<=12;m++) {
messageSendInt(digitalRead(m)); // Read digital pins 2 to 12, 13 is onboard LED on Arduino NG
}

messageEnd(); // Terminate the message being sent

}
}
}
}

Using Pure Data (Pd) to read values.
more here http://www.arduino.cc/playground/Interfacing/PD

Have you tried using a simple program from the Arduino (e.g. the ASCII Table or Graph examples) and reading them with a terminal program (or screen)?

Cheers for pointing me in the right direction mellis.
Oddly, running screen seems to have solved things. My theory (ha) is that this build of Pd is unable to specify baud rate, hence the problem.

If anyone else stumbles blindly into this topic, here's how to run screen (open a terminal ctrl+alt+T).

screen /dev/ttyUSB0 9600

where the last number is the baud rate