#!/usr/bin/env python3 # -*- coding: utf-8 -*- import RPi.GPIO as GPIO from flask import Flask, request, jsonify app = Flask(__name__) pwm_dict = {} # set the mode of raspberry pi # when mod = 10 set the mode as GPIO.BOARD # when mod = 11 set the mod…