Great Explanation! Can we use fgets() and atoi() or atof() to enter an integer or floating point number from the keyboard to the MCU? For example, something like this: char mynum_printf[20]; int mynum = 0; printf("Please enter an integer: "); fgets(mynum_printf, sizeof(mynum_printf), stdin); mynum = atoi(mynum_printf); printf("Your number is: %d ", mynum);
Hey! Nice tutorial. But in my case, I can't print float numbers. I've my printf as "This is a float = %f", but the out is "This is a float = ", why happen this? I've linker flags configured as you teach in your video and I have the functions. I'm using USB like COM port (CDC_Transmit_FS function).
Awesome - i got things printing on serial but after 35 cycles (no matter what HAL_Delay i put) , my code gets stuck in UART_WaitOnFlagUntilTimeout forever - any ideas on what could be causing t his? I'm using the STM32L476RG Nucleo board.
Hey Yaqoob ! Thank you so much :) it was very helpful. could you pleas make vidoe about ( 4x4 Keypad I2C 8bit IO Expander with stm32f4 discoveryboard )?. I need that actually for my final project
@@mutexembedded2206 I tried it , works fine for int but not for float. I tried to search for linker flag in mcu gcc linker but not able to find linker flag in stm32cube iDE
@@arrshithrg5359 It is easy, just a checkbox, read this: community.st.com/s/question/0D50X0000B0AEJb/uprintffloat-where-to-set-for-clinker-in-stm32cubeide
Hi Christian, I have observed (by chance), this entire thing only works if the string is terminated by or . Please try printing something like printf("Hello World! ); .