Batteriesnotincluded
Posts: 7
Joined: Fri Apr 04, 2014 12:34 pm

Wireless/wifi control

Sat Apr 12, 2014 5:06 pm

Hey guys and girls
We have decided to control our robot with wifi, using a wifi dongle and a wifi router repeater which will also be another dongle. (We are using two RPis by the way). Anyway, does anyone have any suggestion on how we would go about controlling our robot via wifi (I have a control programme I've made in python). Could we control the robot by installing the control program on both RPi's and having one as the dominant? Please, any help would be greatly appreciated!
Thanks

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Wireless/wifi control

Sat Apr 12, 2014 7:05 pm

It depends on how your program works. How does it get its inputs now? The goal is to have the other Pi on the network allow it to simulate those inputs. If you're typing gpio commands at the CLI, just have a bash script that executes those commands. If you're reading them from a file, have them read from the other Pi. If there's a GUI display interface that somehow passes commands into a program to operate the robot, then you're just moving the GUI to the other Pi and still passing the same commands into the same program.
All you're doing is moving your front-end off the local Pi and onto the remote one, and carrying the control commands between the two over the network. Make sense?

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Wireless/wifi control

Sat Apr 12, 2014 7:37 pm

Hi,
Batteriesnotincluded wrote:We have decided to control our robot with wifi, using a wifi dongle and a wifi router repeater which will also be another dongle. (We are using two RPis by the way). Anyway, does anyone have any suggestion on how we would go about controlling our robot via wifi
It seems that your focus is set to improper direction... You're mentioning WiFi too much. Your control can be 100% equal if you'd have Ethernet connection instead of WiFi. Therefore: forget about WiFi, your RasPis are connected together via TCP/IP protocol and this is the only important thing in this context.
Batteriesnotincluded wrote:(I have a control programme I've made in python).
I guess that this program controls the robot locally and you'd like to control it now from another RasPi, right ?
If yes, then think about splitting this existing program on two parts - the one for sending commands to the robot (installed on one RasPi) and the other which takes commands from you (installed on another RasPi). What you need to add is to implement/establish a communication path between those two parts now located on two RasPis. For this purpose I'd use sockets.


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

AforAlex
Posts: 85
Joined: Thu May 31, 2012 7:56 pm

Re: Wireless/wifi control

Sun Apr 13, 2014 7:05 pm

Webiopi might be what you want, I assume you are using the gpio to drive motors or similar, you could make yourself a nice Web interface that way.

Have a look here https://code.google.com/p/webiopi/wiki/INSTALL and check the back issues of the Magpi as they did a couple of
Guides also

Batteriesnotincluded
Posts: 7
Joined: Fri Apr 04, 2014 12:34 pm

Re: Wireless/wifi control

Sat Apr 19, 2014 2:45 pm

For this purpose I'd use sockets
Any more information on how to go about this?
Many thanks

User avatar
DougieLawson
Posts: 36546
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Wireless/wifi control

Sat Apr 19, 2014 3:27 pm

FLYFISH TECHNOLOGIES wrote:For this purpose I'd use sockets.
I'd use MQTT with mosquitto running one RPi.

You pass messages by a subscriber publishing them on an MQTT topic and the consumers subscribing to the topics they are interested in. It's a one-to-one or one-to-many messaging protocol.

http://mqtt.org
http://mosquitto.org

sudo apt-get install mosquitto
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
iinnovations
Posts: 621
Joined: Thu Jun 06, 2013 5:17 pm

Re: Wireless/wifi control

Sat Apr 19, 2014 5:26 pm

DougieLawson wrote:
FLYFISH TECHNOLOGIES wrote:For this purpose I'd use sockets.
I'd use MQTT with mosquitto running one RPi.

You pass messages by a subscriber publishing them on an MQTT topic and the consumers subscribing to the topics they are interested in. It's a one-to-one or one-to-many messaging protocol.

http://mqtt.org
http://mosquitto.org

sudo apt-get install mosquitto
I'd like something like this for serial communication for my wireless RF networks. I'm writing the messenging library now and it's not a lot of fun.
CuPID Controls :: Open Source browser-based sensor and device control
interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

Return to “Automation, sensing and robotics”