Building Robots with Python and Raspberry Pi
  • Introduction
  • Chapter1
  • Chapter2
  • Chapter3
  • Chapter4
  • Chapter5
  • Chapter6
  • Chapter7
  • Chapter8
  • Chapter9
  • Chapter10
Powered by GitBook
On this page
  • Camera Streaming
  • Web Control

Chapter9

PreviousChapter8NextChapter10

Last updated 7 years ago

Raspberry PI is a very powerful platform. It can not only run python to control the GPIO pins, but also can be used as generic server for various applications. In this chapter, we will set up two web servers: one web server to stream the live camera views and another web server for the user to control the robot through browser.

We open sourced the entire project and the code can be found on .

Camera Streaming

If you installed the camera module on raspberry PI. The camera view can be streamed live. The code for live stream can be found on .

Web Control

Tornado web server is used for our project. Information about Tornado can be found on tornado's website . Tornado web server is running on port 9000 of raspberry PI's IP address. To access the raspberry car, please type the following in a browser (PC, Pad, or mobile phones) :

A web page will show up. It consists of a live streaming of the camera view and control bottoms for car movement.

https://github.com/ocmelody/piweb
https://github.com/ocmelody/piweb/tree/master/camera_streamer
http://www.tornadoweb.org/
http://IP_ADDRESS_OF_RAPSBERRY_PI:9000