14.Networking and Communications

I used 2 Arduinos(One Seeeduino - an Arduino compatible and an Arduino Uno).

I used the UART serial communication, to have Arduino to control the on-board LED on on the Seeeduino.

Codes on Seeeduino as following -

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(13, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  if (Serial.read() == '1') {
    digitalWrite(13, HIGH);
    delay(2000);
    Serial.println("hello");
  }
  else
    digitalWrite(13, LOW);
}

Codes on Arduino as following -

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.print('1');
  delay(2000);
}

Use an wire connects from Tx on Arduino to Rx on Seeeduino.