cancel
Showing results for 
Search instead for 
Did you mean: 

USB CDC how to receive values without transmitting

zaid shakil
Associate
Posted on July 26, 2017 at 16:09

The original post was too long to process during our migration. Please click on the attachment to read the original post.
1 REPLY 1
Posted on October 03, 2017 at 16:42

Hello!

Just add to your 'while loop' the CDC_Transmit_FS(..); function.

like this

/* USER CODE BEGIN 3 */

DataToSend[0] = 0x11;

DataToSend[5] = 0x22;

DataToSend[6] = sensors.gp2y0a60szlf_distance_cm;

DataToSend[9] = 0x0A;

CDC_Transmit_FS(DataToSend, 10);

Note that CDC_Transmit_FS(..) is tweaked and you can't check the result of function if is succeded or busy.

Regards

vf