User Tools

Site Tools


serial_communications_sketches

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

serial_communications_sketches [2019/08/17 15:04] (current)
Line 1: Line 1:
 +<code c software_loobback.pde>​
 +/*
 + ​Software Serial Loopback (work with USB serial too)
 + This example code is in the public domain. ​
 + */
 +//Serial USB
 +//Serial0 Uart1 shared by all Kard Slots except Serial ​
 +//Serial1 rs232 rail c
 +//Serial2 422 H-bus
 +//Serial3 422 rail c
 +void setup() ​
 +
 +  Serial.begin(115200); ​
 +
  
 +void loop() ​
 +{
 +  int data = 0;   // for incoming serial data
 +  if (Serial.available() > 0) {
 +    data = Serial.read(); ​ // read the incoming byte:
 +    Serial.write(data); ​   // Send it back from where it came
 +  }
 +
 +</​code>​
serial_communications_sketches.txt ยท Last modified: 2019/08/17 15:04 (external edit)