User Tools

Site Tools


serial_communications_sketches
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
  }
} 
serial_communications_sketches.txt · Last modified: 2019/08/17 15:04 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki