Skip to content

Commit e8272c7

Browse files
committed
Added Serial 'tests' for Interrupt and stock code
1 parent 725ad11 commit e8272c7

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
HardwareSerial hwSerial(0);
2+
HardwareSerial hwSerial2(2);
3+
4+
void setup()
5+
{
6+
hwSerial.begin(115200);
7+
hwSerial2.begin(115200);
8+
hwSerial2.setRXInterrupt(onSerialRX);
9+
10+
}
11+
12+
void loop()
13+
{
14+
delay(1);
15+
}
16+
17+
void onSerialRX(char* c){
18+
hwSerial.print(c);
19+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
HardwareSerial hwSerial(0);
2+
HardwareSerial hwSerial2(2);
3+
4+
void setup()
5+
{
6+
hwSerial.begin(115200);
7+
hwSerial2.begin(115200);
8+
}
9+
10+
void loop()
11+
{
12+
hwSerial.print(hwSerial2.read());
13+
}

0 commit comments

Comments
 (0)