I write my program in the XP which send the serial data to PC, the data will collect from the analog port every 0.4 s. In XP i can see the received data changing every 0.4 s , but when i connect to a PC with Window 2000 system, I found that the data transmission will stop after few seconds.
anyone know what happen to my program ?
thanks
my code :
int fsrPin;
int fsrPin1;
int fsrPin2;
int fsrPin3;
String a;
String b;
String c;
String total;
void setup(void)
{
Serial.begin(9600);
a=String("$");
b=String("/");
c=String("%");
}
You are mixing lots of String operator calls and String copy constructor calls here. You would be a lot better off if you simply deleted every String object from your sketch, and used a character array. The sprintf function is your friend.
I found that the data transmission will stop after few seconds.
Does the Arduino quit sending (the TX light quits flashing) or does the PC quit receiving?