Page 1 of 1
Web Controlled Robot
Posted: Wed Jan 01, 2014 4:39 am
by vpgautham
Hai Guys,
I am not just a newbie, i was completely unaware of raspberry pi and other devolopement boards untill last year.Now I am doing a project as part of my curriculum.
I am planning to do a raspberry pi+Arduino project. In the Project, The raspberry pi acts as a web server and when i press a button in the webpage hosted in pi i need pi to send a string to the arduino...how can i do this?? i have searched this in google...but as i am a beginner i could not understand the procedure...please anybody help me
Thanks in advance
Gautham
Re: Web Controlled Robot
Posted: Wed Jan 01, 2014 3:54 pm
by AforAlex
A nice place to start could be to look at WEBIOPI (
https://code.google.com/p/webiopi/), also well worth reading some of the back issues of MagPi (
http://www.themagpi.com/) as they have done some articles on using an Aurdino and also on using WEBIOPI.
Happy New Year
Re: Web Controlled Robot
Posted: Mon Jan 06, 2014 2:55 pm
by vpgautham
thanks for the quick response...will surely do it...
thanks
Re: Web Controlled Robot
Posted: Wed Jan 08, 2014 3:40 am
by danjperron
I just redid a small project using Xbee to power my roomba from the net.
I use
webiopi lighttpd to send a string to a Xbee transceiver via usb serial.
Basically the Rpi run the
webiopi web server and when I press a button at the web page, the web server send a serial command string which is interpret by the roomba to power on and it starts to clean the room.
web server -> usb -> serial -> XBee to XBee -> serial -> atmel cpu -> I.R. Led -> roomba (series 400).
Maybe this could help you. Maybe not the Xbee part but the serial stream stuff.
This is the post
http://www.raspberrypi.org/phpBB3/viewt ... 09#p463609
It is in French but you could use google for translation or ask me any question.
Oops update . On this one I didn't use webiopi but lighttpd with cgi-bin script. I do use a lot webiopi and it will be easier to implement since everything will be in python. But this example is still a valid alternative.
Daniel
Re: Web Controlled Robot
Posted: Wed Jan 08, 2014 11:44 pm
by danjperron
And this is the post I did for my little raspberry pi robot.
This one use "webiopi".
http://www.raspberrypi.org/phpBB3/viewt ... 89#p353089
In the python code , I do use the serial port to control the Polulu servo control board.
Again it is in French! But the code is easy to understand.
Daniel
Re: Web Controlled Robot
Posted: Mon Jan 27, 2014 2:41 pm
by vpgautham
thanks sir for the response.....
sorry for my late reply...i was unable to check internet for the past 2 weeks...
i am gonna check the lighttpd now
Re: Web Controlled Robot
Posted: Mon Jan 27, 2014 2:58 pm
by vpgautham
thank you sir for your replies....and finally i have decided to use webiopi .....
thank you sir....can i ask you if any problem occurs in future???
Re: Web Controlled Robot
Posted: Wed Jan 29, 2014 4:53 pm
by vpgautham
Sir,
I am using this tutorial to make the RaspberryPi a web server and wifi access point.....but when i configure the RPi with WebIOPi what changes should i do?? pls help??
http://www.daveconroy.com/using-your-ra ... eb-server/
@danjperron sir pls help me...because the link you gave to your older post has helped me alot...big thanks for that....
Re: Web Controlled Robot
Posted: Wed Jan 29, 2014 5:49 pm
by danjperron
I assume that the wifi parts is up and running.
Now if you have installed webiopi and just start the service
and when you open an webpage using the Rpi IP with the webiopi port like
http://RaspberryPi_IP:8000
what does it do?
Daniel
Re: Web Controlled Robot
Posted: Thu Jan 30, 2014 5:11 pm
by vpgautham
So i dont have to direct webiopi to use wlan0 port...ok...let me try it....
Then i have a doubt if i have a RPi camera module can i give a live video stream in the same web page??
Thnx for responding always...!!
Re: Web Controlled Robot
Posted: Thu Jan 30, 2014 5:49 pm
by danjperron
Yes if you are using mjpeg streamer, for example, just add an image in your html web page.
Code: Select all
<img width="800" height="450" src="http://MyRaspberryPI_IP:10088/?action=stream">
B.T.W. Don't use windows explorer . It won't work with this browser. Use safari, chrome or firefox.
Daniel
Re: Web Controlled Robot
Posted: Fri Jan 31, 2014 2:22 am
by vpgautham
ok.....thnx.......will let you know the result..
Re: Web Controlled Robot
Posted: Fri Feb 07, 2014 8:48 am
by vpgautham
sir i cant get the wifi part running......i am using a EDUP EP-N8531 wifi adapter and i cant configure hostapd ?? driver issue.....
actually can i get my local server running with just these lines in the /etc/interfaces??
iface wlan0 inet static
wpa-ssid "<My SSID>"
wpa-psk "<My Password>
address 192.168.1.100
netmask 255.255.255.0
do i have to use HostAPD??
pls help....
Re: Web Controlled Robot
Posted: Fri Feb 07, 2014 12:05 pm
by danjperron
I'm not an expert in wifi.
But do you have a wifi router?
Since I'm not using a desktop I use "wpa-conf" instead of "wpa-roam"
Code: Select all
pi@raspberrypi ~ $ cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
#iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
And in the /etc/wpa_supplicant/wpa_supplicant.conf
Code: Select all
pi@raspberrypi ~ $ sudo cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="putYourEssidThere"
psk="putYourPskKeyThere"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}
I do have 3 types of wifi dongles. For the ZD1211B, I need to install a wifi firmware.
Code: Select all
sudo apt-get install zd1211-firmware
Daniel
Re: Web Controlled Robot
Posted: Fri Feb 07, 2014 2:01 pm
by vpgautham
so i have to use a router if i dont use hostapd??? right??
Re: Web Controlled Robot
Posted: Fri Feb 07, 2014 3:12 pm
by danjperron
Yes!
At least you will be able to go forward.
Or use your phone if you want to control it with it. I should check that, never done it.