Using the USB port to communicate with Raspberry Pi

On a few other threads people mentioned using the USB port to communicate with a Raspberry Pi. I think this could be really useful for data collection, getting live values, etc. However, I couldn’t find an example program for how to do this in VEXcode. If anyone has successfully done this in VEXcode, I’d appreciate if you shared!


The V5 implements a composite USB device that has two serial ports. The second serial port is for use by user code, use standard C or C++ stdio functions like printf or std::cout.


If your goal is data collection, you can have the USB port give information back to a computer’s terminal, you can save data to an SD card, or you could display it on the brain.

1 Like

So the std::cout stream sends values over USB as well as displays them to the screen? (I don’t have much experience with serial communication or c++, but I’m learning!)

This seems like a very valuable thread, so I’m surprised it just trailed off. Has anyone done this yet, and communicated data between a V5 brain and a Pi over USB? For me, I’m not interested in logging, I’m interested in sending data from the Pi to the V5 brain.

Totally, almost 3 years ago now. Not with VEXcode but it shouldn’t be that different than PROS.

Is there something you are struggling with?

1 Like

Thanks for the encouragement! Only that I haven’t had time to try it myself, and a student wants to know how to proceed with a summer project.

Lets discussion continue over here