This is my 1st post.
I wonder if someone helps me with this problem:
I want to connect a rc toy car to the computer with usb cable and program a program that allows me to control the car just by keyboard(up, down, left, right arrows). And the thing that I want is the source code of cotroling it in c++.
I beg you to help me...I need to know.
It's a toy car which is controlled by a controller.
Of course it doesn't, I want to build it but what it is, is not important.
The major point I need to get is just the code for c++.
There are no standard functions in C++ to "control toy cars". Unless you have an API (Application Programming Interface) or SDK for this toy car, no one can help you. That is how you control devices -- the manufacturer already has a programming library available, and you call the functions in the library to do whatever needs to be done.
You mentioned good points that I haven't noticed.thanks.
so let me tell the story...
My teacher has assigned me to bring him the code and he said it is at most 5 lines to be built and now I'm shocked on what you saying.
1.He didn't know what he ordered.
2.You are making it complex while it's easy to make.
3.He knew but he wanted me to research.
But pleeeaaase...I'm just a beginner, what are APIs & SDKs?
Finally, thanks a lot and I wonder if you just send me a hypothetical code supposing there are API & SDK to be given to my teacher for example:
Although it's nonsense but I would be grateful if you send me the better one, I will work on his mind to satisfy.
You're not asking a question that anybody here can answer. Five lines is nonsense. Nobody here is going to guess or make up a hypothetical program. What's the point? Google can help you find what an API or SDK is. The answer's not going to change no matter how many times you ask.
Go back to your teacher and ask him for the car's controller's documentation.