2023-05-11 05:57 AM - edited 2023-11-20 05:40 AM
Hi, i converting/translating an arduino code to STM32. Do someone know a similar function in STM32 Cube as arduino "serial.write" and "serial.print"?
I know that the function "HAL_UART_Transmit(&huart,Data, size, 100)" works simalarly as serial.write. Do someone know how to make your own "serial.print"? if Cube IDE has a similair function, it would be also good for me.
In the pictures you can find the explanation of arduino "serial.write" and "serial.print.
To retain about arduino serial.print is the following:
To retain about arduino serial.write is the following:
Serial.write(78); // send a byte with the value 78, so i think serial.write(78) gives "N" --> "N" is the ASCI character linked on decimal 78.
2023-05-11 06:17 AM
Presumably you create a C++ class..
Alternatively you'd get the plumbing to the UART done, and then use puts(), putchar(), printf(), etc
Or write some subroutines, wrap the functionality, and do a search-n-replace to point to those instead
2023-05-11 07:45 AM
Why did you start a new thread? See https://community.st.com/s/question/0D53W00002FqrNWSAZ/how-to-use-the-arduino-string-object-in-cube-ide
2023-05-12 12:36 AM
I opened a new thread because the question was different.