Book Image

Raspberry Pi Embedded Projects Hotshot

Book Image

Raspberry Pi Embedded Projects Hotshot

Overview of this book

Table of Contents (20 chapters)
Raspberry Pi Mechatronics Projects HOTSHOT
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Setting up a web server to record health parameters


In this task, we will build a simple web server that can be used to maintain critical health parameters. Let's consider a scenario where a person is diagnosed with high blood pressure. The doctor asks the patient to record his/her vital health parameters such as pulse, oxygen level, or blood pressure. For this situation, we will build a simple web page that records the data and stores it in a CSV file.

Prepare for lift off

We will be using the Flask framework (http://Flask.pocoo.org/) to deploy the web server on Raspberry Pi. We made use of the Flask framework in Project 4, Christmas Light Sequencer. Just in case you skipped through Project 4, Christmas Light Sequencer, a Python package manager such as pip or easy_install is required to install the Flask framework:

sudo apt-get install python-pip

After the installation of the Python package manager is complete, the Flask framework may be installed as follows:

sudo pip install Flask

Engage...