]> git.piffa.net Git - arduino/blob - books/pdummies/Libraries/Adafruit_GPS/examples/flora_gpstest/flora_gpstest.ino
first commit
[arduino] / books / pdummies / Libraries / Adafruit_GPS / examples / flora_gpstest / flora_gpstest.ino
1 // test a passthru between USB and hardware serial
2      
3 void setup() {
4   while (!Serial);
5   Serial.begin(9600);
6   Serial1.begin(9600);
7 }
8
9      
10 void loop() {
11   if (Serial.available()) {
12     char c = Serial.read();
13     Serial1.write(c);
14   }
15   if (Serial1.available()) {
16     char c = Serial1.read();
17     Serial.write(c);
18   }
19 }