Page 1 of 1

Wireless/wifi control

Posted: Sat Apr 12, 2014 5:06 pm
by Batteriesnotincluded
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

Re: Wireless/wifi control

Posted: Sat Apr 12, 2014 7:05 pm
by Tarcas
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?

Re: Wireless/wifi control

Posted: Sat Apr 12, 2014 7:37 pm
by FLYFISH TECHNOLOGIES
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.

Re: Wireless/wifi control

Posted: Sun Apr 13, 2014 7:05 pm
by AforAlex
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

Re: Wireless/wifi control

Posted: Sat Apr 19, 2014 2:45 pm
by Batteriesnotincluded
For this purpose I'd use sockets
Any more information on how to go about this?
Many thanks

Re: Wireless/wifi control

Posted: Sat Apr 19, 2014 3:27 pm
by DougieLawson
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

Re: Wireless/wifi control

Posted: Sat Apr 19, 2014 5:26 pm
by iinnovations
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.