Tutorial
Table Of Contents
- 1. Premise
- 2. Raspberry Pi System Installation and Developmen
- 3 Log In to The Raspberry Pi and Install The App
- 4 Assembly and Precautions
- 5 Controlling 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 How to Control DC Motor
- 12 Ultrasonic Module
- 13 Line Tracking
- 14 Make A Police Light or Breathing Light
- 15 Real-Time Video Transmission
- 16 Automatic Obstacle Avoidance
- 17 Why OpenCV Uses Multi-threading to Process Vide
- 18 OpenCV Learn to Use OpenCV
- 19 Using OpenCV to Realize Color Recognition and T
- 20 Machine Line Tracking Based on OpenCV
- 21 Create A WiFi Hotspot on The Raspberry Pi
- 22 Install GUI Dependent Item under Window
- 23 How to Use GUI
- 24 Control The WS2812 LED via GUI
- 25 Real-time Video Transmission Based on OpenCV
- 26 Use OpenCV to Process Video Frames on The PC
- 27 Enable UART
- 28 Control Your AWR with An Android Device
- Conclusion
81
RL=robotLight.RobotLight() # Instantiate the object that controls the LED light
RL.start() # Start thread
'''
Start breathing light mode and stop after 15 seconds
'''
RL.breath(70,70,255)
time.sleep(15)
RL.pause()
'''
Pause for 2 seconds
'''
time.sleep(2)
'''
Start the police light mode and stop after 15 seconds
'''
RL.police()
time.sleep(15)
RL.pause()
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