PlatformIO Community

Miniterm serial showing wrong chars or not print anything, but same project in arduino monitor OK

Hellp, this is my first topic. and I need help with miniterm.

Any project what uses serial, not work on miniterm…

sometimes I got nothing.

opening the same program in Arduino Serial monitor, every works fine.
any board, any project, on Arduino IDE Serial Monitor, everything works fime, but nothing at miniterm…

If I open the Arduino Serial monitor with miniterm open. the miniterm works again until rewrite firmware or restart VSCode

⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮Datalogger Acelerometro
Iniciando Aplicaçao
Adafruit MPU6050 test!
Falha ao iniciar o sensor MPU6050 (acelerometro)

pressing Reset button on Wemos mini, restart again the program and the miniterm is ok…

⸮⸮Datalogger Acelerometro
Iniciando Aplicaçao
Adafruit MPU6050 test!
Falha ao iniciar o sensor MPU6050 (acelerometro)

pressing CTRL + T I I got this:

--- Settings: /dev/ttyUSB0  9600,8,N,1
--- RTS: active    DTR: active    BREAK: inactive
--- CTS: inactive  DSR: inactive  RI: inactive  CD: inactive
--- software flow control: inactive
--- hardware flow control: inactive
--- serial input encoding: UTF-8
--- serial output encoding: UTF-8
--- filters: default

When we compile and upload code to board, the ESP led turnoff when we open the miniterm.

when we open Arduino Serial, this led turn on again.

I’m very confusing here… maybe this usb uses Hardware Protocol… I can t activate this function by CTRL +T and Ctrl + r

if I call from console:
pio device monitor -b9600 -p/dev/ttyUSB0 --rtscts
they repeat again same serial.println string. very fast. and the led if off.

r MPU6050 (acelerometro)
r MPU6050 (acelerometro)
r MPU6050 (acelerometro)
r MPU6050 (acelerometro)
r MPU6050 (acelerometro)
r MPU6050 (acelerometro)
r MPU6050 (acelerometro)
r MPU6050 (acelerometro)

Hi @wagnerdequeiroz,

First, you have an indentation problem… you should align line 79 with 78…
Check if all code is correct indentationed :thinking:

Have you ever tried to add this in your platformio.ini file:

monitor_port = /dev/ttyUSB0 
monitor_speed = 9600

Then, build and flash your project and let me know what happens.

Cheers :slightly_smiling_face:

platformio.ini is what?

If you’re using an ESP8266 or ESP32, the first lines of output will be from the bootloader at a different baud (74480 or 115200 respectively) an will appear as garbage characters in miniterm. The Arduino IDE explicitly looks for that output and supresses it, and so the user never sees it, although the device outputs it.

Also, if it works in Arduino IDE, state what Arduino core version and library versions this is using.

If i open the same board in arduino Serial Monitor, everything works, I think, maybe is serial with Hardware Control…

when I put these lines into platformio.ini now works again…

upload_speed = 921600
monitor_speed = 9600
monitor_dtr = 0
monitor_rts = 0

I lost 5 long days trying fix this. I don t understand why everything works one day, in another day nothing work.

1 Like

@ruben, sorry my identation problem, when I call the snapshot program to create a rect than window, I press Space into vscode instead snapshot program. I fixed the error after put the print here.

1 Like