fork download
  1. #if ARDUINO_USB_CDC_ON_BOOT
  2. #define S3USBSerial Serial
  3. #else
  4. #if ARDUINO_USB_MODE
  5. #define S3USBSerial USBSerial
  6. #else
  7. #error "Please, board settings -> USB CDC On Boot=Enabled"
  8. #endif
  9. #endif
  10.  
  11. void setup() {
  12. S3USBSerial.begin(115200);
  13. }
  14.  
  15. void loop() {
  16. static int cnt = 0;
  17. cnt++;
  18. S3USBSerial.printf("cnt = %d\n", cnt);
  19. delay(100);
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:7:6: error: #error "Please, board settings -> USB CDC On Boot=Enabled"
     #error "Please, board settings -> USB CDC On Boot=Enabled"
      ^~~~~
prog.cpp: In function ‘void setup()’:
prog.cpp:12:3: error: ‘S3USBSerial’ was not declared in this scope
   S3USBSerial.begin(115200);
   ^~~~~~~~~~~
prog.cpp: In function ‘void loop()’:
prog.cpp:18:3: error: ‘S3USBSerial’ was not declared in this scope
   S3USBSerial.printf("cnt = %d\n", cnt);
   ^~~~~~~~~~~
prog.cpp:19:3: error: ‘delay’ was not declared in this scope
   delay(100);
   ^~~~~
stdout
Standard output is empty