Skip to content

Commit 0b21426

Browse files
committed
fix serial build error
1 parent cd12f67 commit 0b21426

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

examples/IR/Receive/Receive.ino

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ decode_results results;
3535
void setup()
3636
{
3737
M5StackChan.begin();
38-
USBSerial.begin(115200);
38+
Serial.begin(115200);
3939

4040
// Perform a low level sanity checks that the compiler performs bit field
4141
// packing as we expect and Endianness is as we expect.
@@ -55,23 +55,23 @@ void loop()
5555
if (irrecv.decode(&results)) {
5656
// Display a crude timestamp.
5757
uint32_t now = millis();
58-
USBSerial.printf(D_STR_TIMESTAMP " : %06u.%03u\n", now / 1000, now % 1000);
58+
Serial.printf(D_STR_TIMESTAMP " : %06u.%03u\n", now / 1000, now % 1000);
5959
// Check if we got an IR message that was to big for our capture buffer.
60-
if (results.overflow) USBSerial.printf(D_WARN_BUFFERFULL "\n", kCaptureBufferSize);
60+
if (results.overflow) Serial.printf(D_WARN_BUFFERFULL "\n", kCaptureBufferSize);
6161
// Display the library version the message was captured with.
62-
USBSerial.println(D_STR_LIBRARY " : v" _IRREMOTEESP8266_VERSION_STR "\n");
62+
Serial.println(D_STR_LIBRARY " : v" _IRREMOTEESP8266_VERSION_STR "\n");
6363
// Display the tolerance percentage if it has been change from the default.
64-
if (kTolerancePercentage != kTolerance) USBSerial.printf(D_STR_TOLERANCE " : %d%%\n", kTolerancePercentage);
64+
if (kTolerancePercentage != kTolerance) Serial.printf(D_STR_TOLERANCE " : %d%%\n", kTolerancePercentage);
6565
// Display the basic output of what we found.
66-
USBSerial.print(resultToHumanReadableBasic(&results));
66+
Serial.print(resultToHumanReadableBasic(&results));
6767
// Display any extra A/C info if we have it.
6868
String description = IRAcUtils::resultAcToString(&results);
69-
if (description.length()) USBSerial.println(D_STR_MESGDESC ": " + description);
69+
if (description.length()) Serial.println(D_STR_MESGDESC ": " + description);
7070
yield(); // Feed the WDT as the text output can take a while to print.
7171
// Output the results as source code
72-
USBSerial.println(resultToSourceCode(&results));
73-
USBSerial.println(); // Blank line between entries
74-
yield(); // Feed the WDT (again)
72+
Serial.println(resultToSourceCode(&results));
73+
Serial.println(); // Blank line between entries
74+
yield(); // Feed the WDT (again)
7575
}
7676
delay(50);
7777
}

examples/IR/Send/Send.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,22 @@ uint8_t samsungState[kSamsungAcStateLength] = {0x02, 0x92, 0x0F, 0x00, 0x00, 0x0
2626
void setup()
2727
{
2828
M5StackChan.begin();
29-
USBSerial.begin(115200);
29+
Serial.begin(115200);
3030
irsend.begin();
3131
}
3232

3333
void loop()
3434
{
35-
USBSerial.println("NEC");
35+
Serial.println("NEC");
3636
irsend.sendNEC(0x00FFE01FUL);
3737
delay(2000);
38-
USBSerial.println("Sony");
38+
Serial.println("Sony");
3939
irsend.sendSony(0xa90, 12, 2); // 12 bits & 2 repeats
4040
delay(2000);
41-
USBSerial.println("a rawData capture from IRrecvDumpV2");
41+
Serial.println("a rawData capture from IRrecvDumpV2");
4242
irsend.sendRaw(rawData, 67, 38); // Send a raw data capture at 38kHz.
4343
delay(2000);
44-
USBSerial.println("a Samsung A/C state from IRrecvDumpV2");
44+
Serial.println("a Samsung A/C state from IRrecvDumpV2");
4545
irsend.sendSamsungAC(samsungState);
4646
delay(2000);
4747
}

0 commit comments

Comments
 (0)