Monday, February 25, 2013

Arduino Due code example: Serial communication - Rx

Simple example run on Arduino Due to read data from Serial, then send back to Serial.

Arduino Due code example: Serial communication - Rx



void setup() {
  //Setup Serial Port with baud rate of 115200
  Serial.begin(115200);

}

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

}


No comments:

Post a Comment