Installation of the Flask framework
In this task, we will install the Flask framework on the Raspberry Pi and complete a test web page on the Raspberry Pi. We will use the Flask framework to control the RGB LED strip.
Prepare for lift off
In the previous projects, we installed python module installers such as pip
or easy_install
. If either of these tools isn't installed, they can be installed by executing the following command:
sudo apt-get install python-pip
Alternatively, you can use the following command:
sudo apt-get install python-setuptools.
Next, we will work on installing the Flask framework and the first example.
Engage thrusters
The Flask framework is installed using the following command:
sudo easy_install flask
Once the installation is complete, we will use an example available from the Flask framework documentation (http://flask.pocoo.org/docs/0.10/quickstart/#quickstart) and create a Python script (using Python IDLE's editor):
from flask import Flask app = Flask(__name__) @app...