Hello,
I have just starting working with embedded systems, I am currently sending sensor data from a L475 Discovery IoT node, board to turbostudio terminal and I can see the data which seems correct.
I now, want to find a way to either save the data while streaming on my pc or copy it from the terminal to a file and then I would do some processing on it.
I have used ftprintf and write functions but they don't seem to work
Could someone help?
this is what I did last but it is not working.
fp=f_open("Issamos.csv","w+");
/* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { /* USER CODE END WHILE */
/* USER CODE BEGIN 3 */ temp_value = BSP_TSENSOR_ReadTemp(); int tmpInt1 = temp_value; float tmpFrac = temp_value - tmpInt1; int tmpInt2 = trunc(tmpFrac * 100000); snprintf(str_tmp,100," TEMPERATURE = %d.%02d\n\r", tmpInt1, tmpInt2); fprintf() HAL_UART_Transmit(&huart1,( uint8_t * )str_tmp,sizeof(str_tmp),1000); fwrite(stFWRITEr_tmp, 100, 1,fp);
fclose(fp);
as you see I am collecting the data and using snprintf to display it in true studio, but writing it to a file doesn't work
ISSAM said:turbostudio terminal
I've not heard of that one - does it not have a facility to capture to file?
If it doesn't, then that's a pretty standard feature in other Terminal apps; eg, TeraTerm.
Or write a utility in your PC language of choice to capture the data from the COM port; I'd probably use Python and PySerial - but any PC language should be able to access the COM port and filesystem.