Garbled characters printing in platform-espressif8266/examples/esp8266-rtos-sdk-blink


I’m pretty new to hardware and just started learning espressif and platformIO. I believe I have setup VSCode and platformIO extension, then built and uploaded esp8266-rtos-sdk-blink with tiny modification of main.c:

void task_blink(void *ignore)
    while (true)
        printf("0"); // modification
        vTaskDelay(1000 / portTICK_RATE_MS);
        printf("1"); // modification
        vTaskDelay(1000 / portTICK_RATE_MS);


The NodeMCU led blinked as expected but serial monitor output garbled characters like this:

 *  Executing task: platformio device monitor 

--- Terminal on /dev/cu.usbserial-0001 | 9600 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp8266_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
)�␀�=�␀tc�0␀� x␐␇��?b`␙�␗������������������������������������������������������������

Any ideas? Thank you!

At the wrong baud, for sure.


so add

monitor_speed = 74480

to the platformio.ini.

Thank you!

BTW it’s 74880, not 74480, and my platformio.ini is:

platform = espressif8266
framework = esp8266-rtos-sdk
board = nodemcuv2

monitor_speed = 74880

platform = espressif8266
framework = esp8266-rtos-sdk
board = esp_wroom_02

monitor_speed = 74880

Thank you again!