How to send commands to BBB wirelessly

I am building a quadcopter project. I want to use OpenCV and C++ language to detect hand gestures to control the quad.
The idea is to detect the gesture then write commands (to move forward, backwards, etc.) to a file on harddisk and then have BBB read commands from that file over WiFi.
I know how to write to a file using C++, but don’t know how to go beyond that. Please help.

Also, if there’s some better way to acheive the gesture control, please recommend. Thank you! :slight_smile:

If you can, maybe avoid the file on harddisk and talk directly to the BBB. The simplest way might be to create a socket connection over WIFI… you could have the BBB host the socket server and connect to it from the host computer using the exposed IP and port. You can then send data through the socket connection to the BBB.

For gesture control, I recommend using something like a Leap Motion or Myo armband. OpenCV would also work, but you’ll be spending a lot of time dealing with issues associated with vision-based systems and even then, it will only work in certain rigid lighting conditions.

Thank you so much Michael. :slight_smile:
I read about socket connections. How can I use it to send data from my C++ code on computer? And how can I have a code on my BBB (again in C++) accept the data sent from my computer?

It’ll be of great help if you suggest references from where I can learn more about sending data to devices through my code on PC.
Thank you again! :slight_smile:

You’ll have two separate programs for the BBB(socket server) and the computer(socket client). In your case, the BBB will program will infinitely loop, waiting for messages. The computer will be event-driven, only sending messages when a gesture has been detected. You should google “C++ sockets” and start from there. This type of tedious research is the price(and ultimately reward) for working on a cool project.

Nodejs with may do the job perfectly. You may think it would be slow, but Nodejs “scripts” have been shown to be as fast as C/C++ native apps in many cases.

Got it. Thank you so much Michael, again. :slight_smile:
Will explore that option, too, William! Thank you! :slight_smile: