How to send commands to BBB wirelessly

157 views
Skip to first unread message

Ved Prakash Pandey

unread,
Aug 21, 2014, 12:36:12 PM8/21/14
to beagl...@googlegroups.com

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! :)

Michael M

unread,
Aug 21, 2014, 3:28:35 PM8/21/14
to beagl...@googlegroups.com
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.

Ved Prakash Pandey

unread,
Aug 22, 2014, 8:45:29 AM8/22/14
to beagl...@googlegroups.com
Thank you so much Michael. :)
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! :)

Michael M

unread,
Aug 22, 2014, 4:14:01 PM8/22/14
to beagl...@googlegroups.com
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.

William Hermans

unread,
Aug 22, 2014, 10:11:25 PM8/22/14
to beagl...@googlegroups.com
Nodejs with socket.io 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.


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ved Prakash Pandey

unread,
Aug 23, 2014, 7:10:09 AM8/23/14
to beagl...@googlegroups.com
Got it. Thank you so much Michael, again. :)
Will explore that option, too, William! Thank you! :)


You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/fxbyoIbWOt0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages