openmv/usr/examples/fb_viewer.py
2014-07-09 04:31:39 +02:00

21 lines
356 B
Python

import sensor, time
sensor.reset()
# Set sensor parameters
sensor.set_brightness(-2)
sensor.set_contrast(1)
#sensor.set_gainceiling(5)
# Set sensor pixel format
sensor.set_framesize(sensor.QVGA)
sensor.set_pixformat(sensor.JPEG)
sensor.set_quality(98)
clock = time.clock()
while (True):
clock.tick()
image = sensor.snapshot()
print(clock.fps())