Configuration Parameter |
Selectable Option/Value |
Description |
String input type |
String variable--Character vector |
Select the input type. |
Sample time (sec) |
-1 (inherited) or specify |
Specify the sample time |
Port Name |
Port Type |
Date Type |
Description |
Input port |
Scalar/Vector |
string/uint8 |
Input data that should be printed on the serial monitor |
This block can be used to print data to a serial monitor.
This block uses the C library function int printf(const char *format, ...) to send formatted output to stdout.
Demo file : esp32_string_processing_demo.slx
This example shows how to use the String Processing Block on ESP32. In this example, sprintf and sscanf functions are used.
A serial monitor software application is required to get the expected results. For this example, PuTTY open-source SSH and telnet client is used to monitor the serial output.
After the model file is compiled and uploaded to the ESP32 board, open the PuTTY software and connect to the relevant serial port with a baud rate of 115200. The following output should be visible on the serial monitor software.