scripts/examples: Show contrast and brightness control by default.

This commit is contained in:
Kwabena W. Agyeman 2025-07-03 13:54:05 -07:00
parent caf56ede8d
commit 8c599b50e8
8 changed files with 16 additions and 0 deletions

View File

@ -11,6 +11,8 @@ import time
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE) # Must always be grayscale.
sensor.set_framesize(sensor.B320X320) # Must always be 320x320.
sensor.set_brightness(128) # Leave at 128 generally (this is the default).
sensor.set_contrast(16) # Increase to make the image pop.
sensor.set_color_palette(image.PALETTE_EVT_DARK)
# The default frame rate is 50 FPS. You can change it between ~20 FPS and ~350 FPS.

View File

@ -11,6 +11,8 @@ import time
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE) # Must always be grayscale.
sensor.set_framesize(sensor.B320X320) # Must always be 320x320.
sensor.set_brightness(128) # Leave at 128 generally (this is the default).
sensor.set_contrast(16) # Increase to make the image pop.
sensor.set_color_palette(image.PALETTE_EVT_DARK)
# The default frame rate is 50 FPS. You can change it between ~20 FPS and ~350 FPS.

View File

@ -11,6 +11,8 @@ import time
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE) # Must always be grayscale.
sensor.set_framesize(sensor.B320X320) # Must always be 320x320.
sensor.set_brightness(128) # Leave at 128 generally (this is the default).
sensor.set_contrast(16) # Increase to make the image pop.
sensor.set_color_palette(image.PALETTE_EVT_LIGHT)
# The default frame rate is 50 FPS. You can change it between ~20 FPS and ~350 FPS.

View File

@ -11,6 +11,8 @@ import time
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE) # Must always be grayscale.
sensor.set_framesize(sensor.B320X320) # Must always be 320x320.
sensor.set_brightness(128) # Leave at 128 generally (this is the default).
sensor.set_contrast(16) # Increase to make the image pop.
sensor.set_color_palette(image.PALETTE_EVT_LIGHT)
# The default frame rate is 50 FPS. You can change it between ~20 FPS and ~350 FPS.

View File

@ -10,6 +10,8 @@ import time
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE) # Must always be grayscale.
sensor.set_framesize(sensor.B320X320) # Must always be 320x320.
sensor.set_brightness(128) # Leave at 128 generally (this is the default).
sensor.set_contrast(16) # Increase to make the image pop.
# The default frame rate is 50 FPS. You can change it between ~20 FPS and ~350 FPS.
sensor.set_framerate(50)

View File

@ -15,6 +15,8 @@ import time
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE) # Must always be grayscale.
sensor.set_framesize(sensor.B320X320) # Must always be 320x320.
sensor.set_brightness(128) # Leave at 128 generally (this is the default).
sensor.set_contrast(16) # Increase to make the image pop.
sensor.set_framerate(200)
# Applies sensor biases tuned for tracking of an active marker with LEDs
sensor.ioctl(sensor.IOCTL_GENX320_SET_BIASES, sensor.GENX320_BIASES_ACTIVE_MARKER)

View File

@ -12,6 +12,8 @@ import time
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE) # Must always be grayscale.
sensor.set_framesize(sensor.B320X320) # Must always be 320x320.
sensor.set_brightness(128) # Leave at 128 generally (this is the default).
sensor.set_contrast(16) # Increase to make the image pop.
sensor.set_framerate(100)
# Enables AFK filter to remove periodic data in the frequency range from 130Hz to 160Hz

View File

@ -10,6 +10,8 @@ import time
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE) # Must always be grayscale.
sensor.set_framesize(sensor.B320X320) # Must always be 320x320.
sensor.set_brightness(128) # Leave at 128 generally (this is the default).
sensor.set_contrast(16) # Increase to make the image pop.
# The default frame rate is 50 FPS. You can change it between ~20 FPS and ~350 FPS.
sensor.set_framerate(50)