Serial monitor strange behavior on ESP32

Hi there folks!
Haven't been here for a while. I just got back into some projects with my esp32's and ran into some strange behavior.
The last time working with them ide 2.0 was still in beta and had som problems on Macos Big Sur regarding esp32's. So back then i reverted to ide 1.8 with esptool 3.0. This worked without a problem. Now without updating ide and esptool, now i couldn't get any connection. Error saying the port is busy. Lsof didn't show any port in use. So finally i installed ide 2.0 upgraded esptool to 4.4, uninstalled de silabs drivers and isntalled the latest.

Now I can successfully upload my sketches over the SLABS_USBtoUART port (don't remember using that one before), but my serial monitor is acting strange. Baud rate is set correctly. When i serial.print or serial.prinln just one symbol, it prints correctly. When i print more than one symbol I just get numbers. Not binary or hexadecimal, just numbers. It is somewhat logic, as in 'hello' always prints as 1701604463 but then again 'hel' prints as 6841708.

Does anybody have any ideas on how this is possible?

Screenshot for refrence.

Ow and this happens on these different boards the same: ESP32 Devkit v4, Wemos mini 32 and TTGO T-1

Thanks in advance!

Folkert

use double quotes for "hello" - not 'hello' with single quotes which are meant for single characters (and special use case that's going away in a future version of C++)

Also watch the compiler's warnings

for details

https://en.cppreference.com/w/cpp/language/string_literal

https://en.cppreference.com/w/cpp/language/character_literal


:warning:
PS: don't post image of text... it's really bad for us as hard to read, for the planet as it takes way more bandwidth and storage space to share....

Ow wow... I did not know that. Must have slipped into my coding because of the PHP work i did in the meantime. Thanks so much for this (simple) clarification!

I'll think about your comment next time i'm planning on posting a screenshot! :+1:

thanks, planet earth (and my eyes) will appreciate that.

have fun

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.