STM32 UART USB communication with PC
I think you better take this in steps:


Is your development environment completely setup and working? If not verify and interface switches and LEDs first. 
Is your sensor interfaced correctly? Verify whatever protocol you are using to connect to it. 
Is your UART working properly? Try coding an echo + 1 example. 
Connect steps 2 and 3. 


There are plenty of examples online about working with STM boards.