can anyone tell me .....how to make c++ program that gives command as output to the robot that connected to usb port....

can anyone tell me .....how to make c++ program that gives command as output to the robot that connected to usb port....

Well first your robot would have to been built with a processor, designed with all the proper AND\OR gates IC's for the overall function of the robot itself. You would then need to have an interface which would connect to maybe a serial line\or USB from PC to serial on the board (a way to translate your PLC code from the computer running the IDE into binary inputs to the digital circuit INPUTS to your processor.
You would then set your processor on the circuit board of your bot to READ input, and you would then upload your ladder program to the ROM on your board for your processor to later interpret.

So if you had sensors like photo sensors(for light), or thermal sensors (heat changes), and your bot encounters heat it the processor would receive a 0011(example) input which would then process your PLC code to actuate the servo from the electric powered water gun you bought from a kids toy store, and it would shoot water at the heat source for X amount of seconds.

If your not rich and trying to be realistic, and you want to build your bot within 3000$ that can be autonomous it would be possible.
Youd build (or take a prefabricated remote controlled vehicle large enough to hold a small laptop with a mobile air card installed, and cheap USB GPS stick) and computer camera installed. YOu would do all the above PLC programming for you bot and integrated digital circuit, build the entire bot to hold your laptop connected to the circuit, and with a remote access program (YOU MADE WITH WINAPI and C++, or went cheap and schemed one already developed) you would then remote into your laptop from your remote location and control your bot while looking through the digital USB camera connceted to it, and you could drive your bot around everywhere so long as you were in a wireless mobile broadband service area and had sufficient battery.


:)
Now with this generalization ... go study digital electronics, electronic principals, use of assembly language and ladder logic, purchase the interface needed, develop your bot, develop a WINAPI c++ program (or lang of your choice), to file stream\macro the ladder logic executeable and you could do stuff like when your looking through the camera view and you put your mouse on the left side of the camera's video screen your bot turns left, and hold left click you bot moves towards whichever side your mouse is on the video screen all through WINAPI.

If your real genious you could cut out the entire PLC interface, and design your own program with drivers to communicate out of a com port sending your binaries to the processor for commands and controls, but that would usually take a team of people to accomplish in order to complete it in a reasonable time.

so there you have it. :)

Maybe I am over analyzing your subject thats not very clear.
You may be speaking of that robot that I beleive sells for like 1000$ who already has everything built and it's own IDE. In that case it would be simple as build the bot from the kit, and write your c++ program to file in commands and run the exe for it's peripheral interface. The problem I see is if you have to compile the instructions for the bot using the OEM's customized software and IF you cant easily open a notepad for example and write in instructions that the bot interprets and save the notepad in the file format\type to be executed for the bots software to run then it wont happen.

EVERYTHING IS POSSIBLE
you just have to make your mindset as equally possible!

Edited 6 Years Ago by CodyOebel: n/a

This article has been dead for over six months. Start a new discussion instead.