blob: 738b4bbde402813edd21176cc18d455a5d3e14b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import sensor, image, time, math
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.HVGA)
sensor.skip_frames(time = 2000)
sensor.set_vflip(True)
sensor.set_hmirror(True)
clock = time.clock()
def main():
img = sensor.snapshot()
img.to_grayscale()
img.scale(copy_to_fb=True, x_size=100)
if __name__ == "__main__":
while(True):
main()
clock.tick()
|