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
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
Happy New Year
Re: Web Controlled Robot
thanks for the quick response...will surely do it...
thanks
thanks
-
- Posts: 3529
- Joined: Thu Dec 27, 2012 4:05 am
- Location: Québec, Canada
Re: Web Controlled Robot
I just redid a small project using Xbee to power my roomba from the net.
I usewebiopi lighttpd to send a string to a Xbee transceiver via usb serial.
Basically the Rpi run thewebiopi 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
I use
Basically the Rpi run the
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
-
- Posts: 3529
- Joined: Thu Dec 27, 2012 4:05 am
- Location: Québec, Canada
Re: Web Controlled Robot
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
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
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
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
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???
thank you sir....can i ask you if any problem occurs in future???
Re: Web Controlled Robot
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....
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....
-
- Posts: 3529
- Joined: Thu Dec 27, 2012 4:05 am
- Location: Québec, Canada
Re: Web Controlled Robot
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
Now if you have installed webiopi and just start the service
Code: Select all
sudo service webiopi start
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
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...!!
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...!!
-
- Posts: 3529
- Joined: Thu Dec 27, 2012 4:05 am
- Location: Québec, Canada
Re: Web Controlled Robot
Yes if you are using mjpeg streamer, for example, just add an image in your html web page.
B.T.W. Don't use windows explorer . It won't work with this browser. Use safari, chrome or firefox.
Daniel
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
ok.....thnx.......will let you know the result..
Re: Web Controlled Robot
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....
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....
-
- Posts: 3529
- Joined: Thu Dec 27, 2012 4:05 am
- Location: Québec, Canada
Re: Web Controlled Robot
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"
And in the /etc/wpa_supplicant/wpa_supplicant.conf
I do have 3 types of wifi dongles. For the ZD1211B, I need to install a wifi firmware.
Daniel
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
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
Re: Web Controlled Robot
so i have to use a router if i dont use hostapd??? right??
-
- Posts: 3529
- Joined: Thu Dec 27, 2012 4:05 am
- Location: Québec, Canada
Re: Web Controlled Robot
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.
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.