01Space / ESP32-S3-0.42OLED

16 stars 6 forks source link

Serial Monitoring does not work #5

Open peteh opened 12 months ago

peteh commented 12 months ago

I'm using the sample project but I cannot get serial monitoring in vscode to work. Any ideas?

I set monitor_speed in the platform.ini to match serial.begin(speed).

ppetermann commented 10 months ago

not sure if you ever found the solution:

if you are on framework = arduino you can add this to your platformio.ini

monitor_speed = 115200
build_flags =
    -DARDUINO_USB_MODE=1
    -DARDUINO_USB_CDC_ON_BOOT=1
peteh commented 10 months ago

Hi thanks for the reply, I'm still struggling and monitoring in platform io does not return anything: platform ini

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
name = ESP32-S3 with 0.42 OLED
description = factory firmware
boards_dir = ./board
#src_dir = .

[env:esp32s3oled]
platform = espressif32
board = esp32-s3-0.42oled
framework = arduino
upload_speed = 921600
monitor_speed = 115200
upload_port = /dev/ttyACM0
monitor_port = /dev/ttyACM0
lib_ldf_mode = deep+
# add build flags to allow serial monitoring
build_flags =
    -DARDUINO_USB_MODE=1
    -DARDUINO_USB_CDC_ON_BOOT=1
lib_deps = 
    kitesurfer1404/WS2812FX@^1.4.1
    olikraus/U8g2@^2.34.15

#[env:s2mini]
#platform = espressif32
#board = lolin_s2_mini
#framework = arduino
#upload_speed = 921600
#monitor_speed = 115200

Code:

#include <Arduino.h>

void setup() {
  // Serial is the TinyUSB interface | USBCDC class | -DARDUINO_USB_CDC_ON_BOOT=1

  Serial.begin(115200);
  Serial.setDebugOutput(true);
  delay(500);

  Serial.println("\n=========\nTesting...\n=========\n");
  log_e("TESTING...");
}

void loop() {
  log_e("TESTING LOOP...");
  Serial.println("Loop...");
  delay(1000);
}
everybodyfloats commented 2 weeks ago

Can anyone tell me how to get the Serial Monitor to work with Arduino?