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
95
if os.environ.get('CAMERA'):
Camera = import_module('camera_' + os.environ['CAMERA']).Camera
else:
from camera import Camera
display the Raspberry Pi on the page in real time. Camera screen.
sudo nano app.py
●Here we use nano that comes with Raspbian to open app.py for editing in the console. Since it is just
some operations for commenting and deleting comments, there is no need to use other IDEs for editing.
●After opening the IDE, we comment out the code:
●You can comment out these lines of code by filling in # at the beginning of the code line, or you can write
a ''' at the beginning and end of the entire code to comment out a certain code. The relevant code after the
change is as follows:
# if os.environ.get('CAMERA'):
# Camera = import_module('camera_' + os.environ['CAMERA']).Camera
# else:
# from camera import Camera
or
'''
if os.environ.get('CAMERA'):
Camera = import_module('camera_' + os.environ['CAMERA']).Camera
else:
from camera import Camera
'''
●Finally, uncomment the code that imports Camera from camera_pi,
# from camera_pi import Camera
delete in front of #, note that there is a space after the # here, and also delete, the changed code is as
follows:
from camera_pi import Camera
●The following is the complete code of the modified app.py:
#!/usr/bin/env python