Example explanation 31-TV-Shield -> tv.py image transmission

Video tutorial 30 - Wired image transmission expansion board: https://singtown.com/learn/50521/

Video tutorial 31 - Wireless image transmission expansion board: https://singtown.com/learn/50535/

# 图传
#
# 注意: 运行此代码需要图传扩展板
#
# 图传扩展板可以实时的查看framebuffer的视频

import sensor, image, tv, time

sensor.reset() # 复位并初始化传感器。

sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE
#设置图像色彩格式,有RGB565色彩图和GRAYSCALE灰度图两种

sensor.set_framesize(sensor.SIF)
#设置图像像素大小

clock = time.clock()

tv.init(triple_buffer=False) # 初始化tv
tv.channel(8) # 用于无线图传扩展板

while(True):
    clock.tick()
    tv.display(sensor.snapshot()) # 拍照并显示图像
    print(clock.fps())

results matching ""

    No results matching ""