# STM32Cube.AI on OpenMV MNIST Example
import sensor, image, time, nn_st
sensor.reset() # Reset and initialize the sensor.
sensor.set_contrast(3)
sensor.set_brightness(0)
sensor.set_auto_gain(True)
sensor.set_auto_exposure(True)
sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to Grays
cale
sensor.set_framesize(sensor.QQQVGA) # Set frame size to 80x60
sensor.skip_frames(time = 2000) # Wait for settings take effec
t.
clock = time.clock() # Create a clock object to track t
he FPS. |