Adding a webserver and webpage to Anna2 for an IOT user interface.

A project log for Anna2 aka A2 the agbot!

Anna2 is a general purpose agricultural robot with an advanced vision system, OpenCV and deep neural network models.

DennisDennis 06/12/2017 at 01:340 Comments

I have already setup remote desktop to talk to the Raspberry Pi. It’s great for writing code on the Raspberry Pi but is not great for running the code. Trying to display live camera feeds from the RPI on the remote desktop will work for a short time and then lock up.
A webserver and a dynamic webpage should be a better choice, plus the webpage will allow the Anna2 to communicate with any web enable device. The Raspberry Pi makes this very easy.

Here’s a nice step-by-step to load both:

I didn’t load Word Press yet. I’m thinking about writing a php enabled webpage from scratch. After loading Apache2 and php, you can navigate to the location of the site in terminal by entering “cd /var/www/html”. Open leafpad to edit the webpage with “sudo nano leafpad index.php” and add the script for the webpage. Save the new webpage as “index.php” and delete the original html site with” sudo rm index.html”.

I entered the below script with leafpad and saved it as index.php to test the webpage.

Then I opened a browser and entered the IP address my RPI is connected to on my WIFI router and the results are below. YAY success!!! Anna2 now has a Webpage!!!