• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoQuick StartUART Loopback Test on pcDuino
Previous Next

UART Loopback Test on pcDuino

Posted by: admin , January 6, 2014

[vc_row][vc_column width=”1/1″][vc_column_text]In cases, we would like to do a quick test of pcDuino UART. Loop back is often a handy method. When doing loop back, we will connect RX to TX as the following:

loopback_setup[/vc_column_text][vc_tour][vc_tab title=”Test Code” tab_id=”1388980772-1-14″][vc_column_text]

#include <core.h>
#include "Serial.h"
void setup() {
Serial.begin(115200);
while (!Serial);
}

void loop()
{
Serial.println("Hello, world");
while (Serial.available() > 0) {
int ret = Serial.read();
printf("I received:0x%.2x(%c)\n", ret, ret);
}

delay(10);

}

[/vc_column_text][/vc_tab][vc_tab title=”Results” tab_id=”1388980772-2-13″][vc_column_text]When we run the code, we can see the output on the screen:
loopback[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]

Tags: Quick Start

Share!
Tweet

admin

About the author

One Response to “UART Loopback Test on pcDuino”

  1. Log in to Reply
    Scott Nightingale
    September 10, 2014 at 6:31 pm

    Thank You!

    This just answered my last two days of searching for an easy way to do inter process communication between Arduino-ish code and other processes running on the same pcDuino.

    So simple, brilliant.

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors