robogaia.com
  • Products
    • 3 Axis Encoder Conter Arduino Shield
    • 6 Channel Encoder Counter Arduino Shield
    • 8 Channel Encoder Counter Arduino Shield
    • Raspberry Pi 6 Channel Encoder Hat
    • Raspberry Temperature Controller Plate
    • 4 Relays Raspberry Pi Plate/Shield
    • C2N-UNI8IO To Terminal Block Board
    • Arduino Solid State Relay
    • Encoder Shield Connector
    • Mechanical Encoder Board with Connector
    • Raspberry Pi Dual Thermocouple Plate
    • Raspberry Pi 3 Channel Encoder Hat
    • HC-SR04 Ultrasonic Distance Sensor
  • Blog
  • Contact
  • Tutorials
    • How to Add a Web Interface to the Raspberry Pi 4 Relay Board
    • How to add a simple web server on Raspberry Pi with Flask Framework
    • How To Calculate Resistor Wattage
    • How To Start With Robotics
    • How To Start With Artificial Intelligence
    • How to start with CNC 6040 machine
    • How to calibrate Robogaia accelerometer/gyro shield
    • How to build Balancino (the balancing robot)
  • Distributors
  • Services
  • About

How to add a simple web server on
Raspberry Pi
with Flask Framework



    Here is a simple way to add a web interface to your projects. Most of the work is done already for you , and the fun part is to put everything together.


What is Flask
Flask is a micro framework written in Python. It is called micro because contains only the most basic things that you need to create a dynamic web interface.

Installing Flask
Open terminal window and type:

sudo apt-get install python-pip

When asked to , type Y and Enter. This will install a tool for installing and managing Python packages.Since Flask is a Python package it will make your life much easier.


The next thing is the installation of the Flask framework.

sudo pip install flask

And that was it.

The official website for Flask is   http://flask.pocoo.org/


4 Relays Raspberry Pi plate/shield

Picture
.

@Robogaia 2021