0

I have written a program for Arduino that reads some analog signals and sends them to the computer when it receives a command from the master computer. I wondered why this didn't work on the computer it was intended to run on. On my own computer it runs fine.

I uploaded a simple test code in the Arduino.

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

void loop() {
    if(Serial.available()) {
        Serial.println(Serial.read());
    }
}

This doesn't run on the second computer either. When I use Arduino serial monitor for transfering data, I see the RX led blink but not the TX. With the computer it's working on, I can see both of the leds flash. Arduino receives the data on both computers, but the second computer doesn't receive Arduino's responses. What might be wrong?

Edit. I forgot the Arduino hooked up to the problematic PC for a few minutes and tried it again. Then it worked! It seems like it needed some time to warm up. Why's that?

dsolimano
  • 8,870
  • 3
  • 48
  • 63
MikkoP
  • 4,864
  • 16
  • 58
  • 106

1 Answers1

0

Sometimes it can take a second for the Arduino and computer to establish the Serial handshake, especially at 9600 baud. I'm glad you got it working!

Steven Petryk
  • 683
  • 4
  • 11
  • 1
    The time it takes is probably closer to 40 seconds. – MikkoP Feb 13 '14 at 05:35
  • @MikkoP it behaviour is always? I am trying to connect the Arduino and my application and something it takes a lot of time. I am talking about 1 minute, do you find a solution to reduce this time or it is only resolved by the software and hardware of the machine? – Robert Jun 04 '15 at 17:38
  • @Robert Unfortunately I wasn't able to get it working any faster. Haven't played with it for over a year now though, could be there's a fix for that or something. – MikkoP Jun 04 '15 at 18:19