crash.software
Projects
Pull Requests
Issues
Builds
CatSniffer
Code
Files
Commits
Branches
Tags
Pull Requests
Code Comments
Code Compare
Issues
List
Boards
Milestones
Builds
Statistics
Contributions
Source Lines
Child Projects
Projects
STRLCPY
CatSniffer
Commits
bf145b01
🤬
Sign In
add pico firmware
Eduardo Contreras
committed
1 year ago
bf145b01
1 parent
4f9f901a
Total 1 files
■ ■ ■ ■ ■ ■
firmware/PICO/SerialPasstrough/SerialPasstrough.ino
1
+
unsigned long baud = 115200;
2
+
3
+
void setup() {
4
+
//Begin Serial ports
5
+
Serial.begin(baud);
6
+
Serial1.begin(baud);
7
+
for(int i=11;i<16;i++){
8
+
pinMode(i,INPUT);
9
+
}
10
+
pinMode(2,INPUT);
11
+
pinMode(3,INPUT);
12
+
13
+
}
14
+
15
+
void loop() {
16
+
//SerialPassthrough
17
+
if (Serial.available()) { // If anything comes in Serial (USB),
18
+
Serial1.write(Serial.read()); // read it and send it out Serial1 (pins 0 & 1)
19
+
}
20
+
21
+
if (Serial1.available()) { // If anything comes in Serial1 (pins 0 & 1)
22
+
Serial.write(Serial1.read()); // read it and send it out Serial (USB)
23
+
}
24
+
}
25
+
All occurrences
Please wait...
Page is in error, reload to recover