Skip to content

Using UV4L For Video Boardcasting and Flask For Contorl

License

Notifications You must be signed in to change notification settings

eastWillow/PiWebRobot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PiWebRobot

Using UV4L For Video Boardcasting and Flask.py For Web GPIO Contorl

Requirements

Install

  1. Please Install All Requriment Package above
  2. Copy /html/SimpleWebRTC.html to /usr/share/uv4l/www/SimpleWebRTC.html
  3. Copy /flask_GPIO to /home/pi/Documents/python/

Change UV4L Setting

sudo nano /etc/uv4l/uv4l-raspicam.conf
--------------another line-------------
server-option = --port=8080
---------------another line-----------
server-option = --enable-www-server=yes
# server-option = --www-root-path=/usr/share/uv4l/www/
server-option = --www-index-file=SimpleWebRTC.html
server-option = --www-port=80

Making flask_GPIO to Autoexecute On Boot

  1. cd init.d
cd /etc/init.d
sudo -E vim flask.sh
  1. Edit flask.sh
#!/bin/sh
# /etc/init.d/flask.sh

case "$1" in
  start)
    echo "StartFlask"
    nohup python /home/pi/Documents/python/flask_GPIO/flask-gpio.py &
    ;;
  stop)
    echo "StopFlask"
    killall python
    ;;
  *)
    echo "Usage /etc/init.d/flask.sh{start|stop}"
    exit 1
    ;;
esac

exit 0
  1. Setting Autoexecute
sudo chmod +x flask.sh
sudo update-rc.d flask.sh defaults

About

Using UV4L For Video Boardcasting and Flask For Contorl

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published