在这里插入代码片
#学习OpenMV 2020.7.23
输出print
列表List
if如果相等则是==
幂运算**
累加要先给存储的变量赋初值 初始为0
for 变量 in range(100)
sum=sum+变量
最后要print(sum)才能得到最后的值
for循环 and while循环
for+变量+in range(范围,终值值,步长值):
函数定义
def 函数名(参数):
功能语句
return 返回值
下面展示一些 内联代码片
。
```python
# Single Color RGB565 Blob Tracking Example
#
# This example shows off single color RGB565 tracking using the OpenMV Cam.
import sensor, image, time, math
threshold_index = 0 # 0 for red, 1 for green, 2 for blue
# Color Tracking Thresholds (L Min, L Max, A Min, A Max, B Min, B Max)
# The below thresholds track in general red/green/blue things. You may wish to tune them...
thresholds = [(30, 100, 15, 127, 15, 127), # generic_red_thresholds