User Manual
Table Of Contents
- 1. Premise
- 2. Raspberry Pi System Installation and Developmen
- 3 Log In to The Raspberry Pi and Install The App
- 4 Raspberry Pi Structure Assembly and Precautions
- 5 Controlling A Robot via WEB App
- 6 Common Problems and Solutions(Q&A)
- 7 Set The Program to Start Automatically
- 8 Remote Operation of Raspberry Pi Via MobaXterm
- 9 How to Control WS2812 RGB LED
- 10 How to Control The Servo
- 11 Calling the API to Control the Robot
- 12 Automatic Stabilization Function
- 13 Gait Generation Method of A Hexapod Robot
- 14 Make A Police Light or Breathing Light
- 15 Real-Time Video Transmission
- 16 Why OpenCV Uses Multi-threading to Process Vide
- 17 OpenCV Learn to Use OpenCV
- 18 Using OpenCV to Realize Color Recognition and T
- 19 Machine Line Tracking Based on OpenCV
- 20 Create A WiFi Hotspot on The Raspberry Pi
- 21 Install GUI Dependent Item under Window
- 22 How to Use GUI
- 23 Enable UART
- 24 Control Your Adeept_RaspClaws with An Android D
- Conclusion
94
●This chapter does not introduce the OpenCV part first, only introduces how to see the real-time picture
of the Raspberry Pi camera on other devices.
●First download flask-video-streaming this project in the Raspberry Pi. You can download it from Clone
on GitHub or download it on your computer and then pass it to the Raspberry Pi. The download command
using the Raspberry Pi console is as follows:
sudo git clone https://github.com/miguelgrinberg/flask-video-streaming.git
● After downloading or transmitting flask-video-streaming in the Raspberry Pi, run the app.py in
flask-video-streaming:
cd flask-video-streaming
sudo python3 app.py
●Not to use sudo python3 flask-video-streaming / app.py to run, there will be an error that * .jpeg is not
found.
●Open the browser on the device on the same local area network as the Raspberry Pi (we use Google
Chrome to test), and enter the IP address of the Raspberry Pi plus the video streaming port number: 5000 in
the address bar, as shown in the following example:
192.168.3.157:5000
● Now you can see the page created by the Raspberry Pi on the browser of your computer or mobile
phone. Note that the default screen is not from the screen of the Raspberry Pi camera, but three digital pictures
cyclically playing 1, 2, 3
● If your page can log in and is playing a picture of 1 \ 2 \ 3 numbers in a loop, it means that the
flask-related programs are running normally. Next, you can make some modifications to app.py so that it can
15 Real-Time Video Transmission
● Real-time video and OpenCV function are the advantages of the Raspberry Pi robot. This chapter
introduces the method of real-time video. In fact, there are many ways to transfer the images collected by the
Raspberry Pi camera to other devices through the network The robot uses the open source project [ fl
ask-video-streaming] from Github the MIT open source agreement, you can click the link to view the source
code of the project.
●The reason for the selection is flask-video-streaming. This solution is the most convenient and the most
efficient of the many solutions we have tried. The part related to OpenCV also has a good interface to rewrite it
as multi-threaded processing.
● Since this project requires the use of Flask and related dependent libraries, our robot software
installation script contains the content of installing these dependent libraries. If your Raspberry Pi has not run
the robot software installation script, you need to use the following command to install .
sudo pip3 install flask
sudo pip3 install flask_cors