Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_camera.i2c_read() and _camera.i2c_write() #281

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Conversation

josuah
Copy link
Member

@josuah josuah commented Nov 17, 2023

This patch should allow sending custom I2C commands to the camera for the various purposes:

  • debugging a sensor
  • enabling RGB mode
  • enabling other camera modes
  • testing/developing new/experimental features safely without requiring a new firmware upgrade
  • allow to ship more features as python files, from either users or Brilliant.

These do not need to be documented or even work now: this is the point of the patch: allow turning on features already present in the device, simply by documenting them.
As long as they do not damage is done by using these functions, they could be shipped.
The I2C address is limited to the camera, which avoids any risk of communicating with any other device.]

Usage:

import _camera
print(_camera.i2c_read(0x1234))
_camera.i2c_write(0x1234, 0x56)

The mask is hard-coded to 0xFF, which can be adjusted by calling i2c_read, masking, then calling i2c_write.

I did not test this all yet.

@josuah josuah changed the base branch from main to dev November 17, 2023 16:35
@siliconwitch siliconwitch merged commit 032c19d into dev Nov 29, 2023
1 check passed
@siliconwitch siliconwitch deleted the dev_camera_i2c branch November 29, 2023 08:25
@kodjima33
Copy link

@siliconwitch @josuah huge thanks for working on this PR! We really need better camera quality and can't move forward without it

@josuah
Copy link
Member Author

josuah commented Nov 30, 2023

need better camera quality

The higher the camera resolution, the longer the transfer time, so this would let you range the exact amount by experimenting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants