Web Server using Raspberry Pi 2

By: Pooja S. Mane & Harshada R. Latinge under the guidance of Prof. Nagesh S. Kulkarni, Assistant professor at VPCOE Baramati, Maharashtra.

13665
 

1. You can install it with:
sudo apt-get install

The general network settings are configured in “ /etc/network/interfaces” while the wifi details are set in “ /etc/wpa_supplicant/wpa_supplicant.conf ” file.

2. Edit the interfaces file
sudo nano /etc/network/interfaces

Ensure that the section about wlan0:
Allow – hotplug wlan0
iface wlan0 inet manual
wpa – roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

If there are differences, then change them to accordingly.

3. To get the list of currently available wireless network,
sudo iwlist wlan0 scan

4. Pick the network and add the network authentication information in the “wpa_supplicant .conf “file
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

The first two lines should already be ready:
I. ctrl_interface=DIR = /var/run/wpa_supplicant GROUP=netdev
II. update_config=1

Now add the following:
Network={
ssid=”Your SSID”
psk=”passward”
key_mgmt=WPA-PSK
}

5. Press ctrl+x to exit nano and save the file.

6. Reboot your Pi
sudo reboot

7. After booting you can check the status of wireless connection using
iwconfig

After this installation you have your RPi2 development board with internet connection. The output of all these installations is a webpage with some buttons indicating actions of vehicle i.e. forward, backward, left, right and stop as mentioned above. We can browse this web-page by entering RPi 2 development board’s static IP address in browser.

Fig 4: Webpage through which we are controlling our robot

Raspberry Pi 2 development board supports for the real-time applications. This above article explains one of the applications that we had worked on it. By making use of Apache, PHP and MySQL, we are able to control our vehicle through web-page.

Future advancement:

It is possible to do video streaming for real time video monitoring on the same webpage by interfacing a camera (CSI port camera or USB port camera) to the RPi2 development board.


 

SHARE YOUR THOUGHTS & COMMENTS

Please enter your comment!
Please enter your name here