Serial communication testing — Arduino Nano simulation

for the UART Communication testing Intergerning Testing

An interactive Arduino Nano circuit simulation you can run free in your browser on Velxio, by mark30805740.

Sketch code

void setup() {
  // Start the hardware serial communication at 9600 baud
  Serial.begin(9600);
}
int n = 0;

void loop() {
  // Check if there is incoming data from Board 1
  if ((n = Serial.available() )> 0) {
    int m = Serial.read();
    Serial.println(m);
    Serial.print("Server received: ");
    Serial.print(n,DEC);
    Serial.print(" byte avaiable to print");
    Serial.println();
    Serial.flush();
  }
  delay(1000);
}

More projects by mark30805740