1

I have a raspberry pi and I want to convert it into a RC car which I will control through my PC. I know C++ programming and I intend to use that to write the software stack. I want to create a C++ program in my laptop through which I can send keyboard strokes to control my rc pi car. There'll be a camera mounted on my rc pi car which will continuously send video stream to my laptop.

I do not have experience with socket programming in C++. There a bunch of libraries out there and I am really confused which one to use. And since my laptop runs windows, the simple socket programming examples are not helping me in communication b/w windows and linux(on pi). Kindly guide me what protocols and libraries should I use. The library should be cross platform.

ghost
  • 21
  • 3
  • Nothing to do with the Pi. – joan Oct 17 '20 at 08:00
  • You can use Rpi4B serial FPV air radio modules. You might find the following Q&A/chat helpful: (1) "How can Rpi4B use UART to read and analyze received data at a 3DR FPV Air Radio Module? (Rpi SE Q&A)": https://raspberrypi.stackexchange.com/questions/105223/how-can-rpi4b-use-uart-to-read-and-analyze-received-data-at-a-3dr-fpv-air-radio,

    (2) "How can Rpi4B use UART to read and analyze received data at a 3DR FPV Air Radio Module? (Rpi SE Chat Record)": https://chat.stackexchange.com/rooms/100706/discussion-on-question-by-thelazy-how-can-rpi4b-use-uart-to-read-and-analyze-rec. Cheers.

    – tlfong01 Oct 17 '20 at 09:32

1 Answers1

2

Basically, you can follow any socket server tutorial, and you don't really need to use any library for this, although they would make it somewhat simpler some of the time, as long as you understand the basics.

I would try to make a basic chat program using simple TCP/UDP sockets (make sure you understand the difference and choose what best suits your case) before tackling something like you are trying, and continue from there (the basic concepts of a chat and a socket controller would be pretty similar IMO).

Here is something I found online to get you started: https://simpledevcode.wordpress.com/2016/06/16/client-server-chat-in-c-using-sockets/comment-page-1/

Tomer Amir
  • 150
  • 5