Go Down

Topic: Serial Connection between two Arduino's (Read 425 times) previous topic - next topic

ikkentim

Hello, I have a little issue, I have two arduino's connected together:
Arduino 1:
TX connected to Arduino 2's RX
RX connected to Arduino 2's TX

Code of arduino 1
Code: [Select]

void setup()
{
  Serial.begin(9600);
  pinMode(13, OUTPUT);
}

void loop()
{
  if(Serial.available() > 0)
  {
    Serial.read();
    digitalWrite(13, HIGH);
    delay(100);
    digitalWrite(13, LOW);
  }
}


Arduino 2's code
Code: [Select]

void setup()
{
  Serial.begin(9600);
  delay(200);
  Serial.print("i");
}

void loop()
{

}


What it should do is, when I press arduino 2's reset button, the LED on arduino 1 should turn on and off for a little while. But it does not work, does anyone know why?

Thanks in advance!
ikkentim

Arrch

Did you connect the grounds together?

ikkentim



Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy