Skip to content

Commit f949cd8

Browse files
authored
feat(hw_cdc): update main.cpp
adds code to wait for the user to open the Serial Monitor
1 parent 837f904 commit f949cd8

File tree

1 file changed

+2
-0
lines changed
  • idf_component_examples/hw_cdc_hello_world/main

1 file changed

+2
-0
lines changed

idf_component_examples/hw_cdc_hello_world/main/main.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
void setup() {
44
Serial.begin(); // USB CDC doens't need a baud rate
5+
while(!Serial) delay(100); // wait for the Serial Monitor to be open
6+
Serial.println("\r\nStarting...\r\n");
57
}
68

79
void loop() {

0 commit comments

Comments
 (0)