You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
void setup() {
|
|
|
// initialize serial communication at 9600 bits per second:
|
|
|
Serial.begin(9600);
|
|
|
}
|
|
|
|
|
|
void loop() {
|
|
|
// send data only when you receive data:
|
|
|
while (Serial.available() > 0) {
|
|
|
// read the incoming byte:
|
|
|
int incomingByte = Serial.read();
|
|
|
|
|
|
Serial.write(incomingByte);
|
|
|
}
|
|
|
|
|
|
static int no = 0;
|
|
|
|
|
|
Serial.print("serial port test ");
|
|
|
Serial.println(no++);
|
|
|
delay(2000);
|
|
|
}
|