Skip to content

Cannot read saturation variable unless it is set #34

Closed
@jmangum

Description

@jmangum

OV5640 in a PiCowbell breakout mounted to a PiCowbell doubler all being run by a RP2350 Pico 2W. Running CircuitPython 9.2.1. When I try the following:

cam = adafruit_ov5640.OV5640(i2c,
        data_pins=(
        board.GP6,
        board.GP7,
        board.GP8,
        board.GP9,
        board.GP10,
        board.GP11,
        board.GP12,
        board.GP13,
        ),
        clock=board.GP3,
        vsync=board.GP0,
        href=board.GP2,
        mclk=None,
        shutdown=None,
        reset=reset,
        size=adafruit_ov5640.OV5640_SIZE_VGA, # 640x480.  Works.  Requires 30720 bytes when quality = 10 (PREFERRED!)
    )
print('Saturation: ',cam.saturation) # Allowed values: -4 to 5 inclusive

...I get the following error...

Traceback (most recent call last):
  File "code.py", line 585, in <module>
  File "asyncio/core.py", line 317, in run
  File "asyncio/core.py", line 276, in run_until_complete
  File "asyncio/core.py", line 261, in run_until_complete
  File "code.py", line 527, in main
  File "adafruit_ov5640/__init__.py", line 1463, in saturation
AttributeError: 'OV5640' object has no attribute '_saturation'

If I first set the saturation before reading it back, I do not get an error...

cam.saturation = 0
print('Saturation: ',cam.saturation) # Allowed values: -4 to 5 inclusive

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions