-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
FireBeetle 2 ESP32-S3 #8623
FireBeetle 2 ESP32-S3 #8623
Conversation
The pin definition is pretty massive, if someone wants to, I would appreciate a double check. Schematic: https://dfimg.dfrobot.com/5d57611a3416442fa39bffca/wiki/a2283283b455fe95377e5d0d423539d9.pdf |
Got the camera working, HOWEVER we need to add a new frozen mpy for the AXP313A pmic, since the camera starts up with 0V supplied to it. The rest of the port definition is done. |
Why do you need to freeze it? Generally you should only do that when you need to save RAM space. |
Because I do not know how to include a python module, for one specific board, inside the core, in another way. |
If it's just a library, why put it in the core? If it's a separate library, it can be updated without having to rebuild CircuitPython. It's ok to have a library for one specific board. |
It's a library yea, but the board needs it to use it's camera. It cannot use it without it. |
That kind of thing is true of boards we have with onboard accelerometers or other onboard things, too. You just have to load the library. It is a trade-off of convenience vs flexibility. We do have a few manufacturers who have elected to freeze a lot of stuff, mostly on educational boards. |
This board has an n16r8 module (it's the only spec, it has a -U variant though), on a regular build it has over 500kb free flash on the app partition and around 250kb on a debug build (with nothing removed). The gains far surpass the costs of including it, especially considering it's just 1.6kb. |
Unless something better is proposed, or the inclusion is NACK'ed, I will continue trying to make it a frozen mpy. |
The module is now included, and works as expected. I will continue to maintain the module and ship incremental fixes and updates. >>> import storage; storage.erase_filesystem()
[13:16:35.031] Disconnected
[13:16:36.032] Warning: Could not open tty device (No such file or directory)
[13:16:36.032] Waiting for tty device..
[13:16:43.038] Warning: Could not open tty device (Permission denied)
[13:16:43.038] Waiting for tty device..
[13:16:44.039] Connected
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 9.0.0-alpha.5-9-ga05259db00 on 2023-11-18; DFRobot FireBeetle 2 ESP32-S3 with ESP32S3
>>> import board
>>> from AXP313A import *
>>> a = AXP313A(board.CAM_I2C())
>>> enable_camera(a, camera_voltages.OV2640)
>>> import espcamera
>>> b = espcamera.Camera(data_pins=board.CAM_DATA, pixel_clock_pin=board.CAM_PCLK, vsync_pin=board.CAM_VSYNC, href_pin=board.CAM_HREF, external_clock_pin=board.CAM_XCLK, external_clock_frequency=20_000_000, powerdown_pin=None, reset_pin=None, i2c=board.CAM_I2C(), pixel_format=espcamera.PixelFormat.JPEG, frame_size=espcamera.FrameSize.VGA, jpeg_quality=11, framebuffer_count=1, grab_mode=espcamera.GrabMode.LATEST)
>>> b.sensor_name
'OV2640'
>>> b.take()
<memoryview>
>>> b.take()
<memoryview>
>>> b.take()
<memoryview>
>>> |
Ci is failing consistently, not sure why. |
Thanks to Jepler's fix, CI is passing now. |
Yes, a numbered release of the library is required. |
Updated to use the cookiecutter style, added black formatting and created tags. I do not have any readthedocs experience, and I would like to skip it for now. |
@bill88t Did you see this guide, which has ReadTheDocs info? https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor thing.
The frozen library is OK with me, but minimizing PR's to update the library would be good. I don't want to have to churn all of CircuitPython for that. If you are going to write this up, describe how to override the frozen library by putting the newer version in the top level of CIRCUITPY.
>>> sys.path
['', '/', '.frozen', '/lib']
I setup readthedocs https://circuitpython-axp313a.readthedocs.io/ I hope I did it alright. It certainly looks fine but idk, it's 5am. |
Also I noted something in the README in the library: bill88t/CircuitPython_AXP313A#1 (comment). Assuming you fix that, you may want to re-release and advance the version in this PR. But go to sleep :) |
It's co-commit time. Co-authored-by: Dan Halbert <halbert@halwitz.org>
Alright, fixed. Thanks for the heads up about the frozen module prioritization! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, great! Thanks for persevering with our requests.
New superboard.
Mandatory port checklist:
usb vid/pid:
The camera currently doesn't work as upon init the board safemodes due to memory.
It's 3 am, I am not even gonna think about it.
It's probably good to merge after I do the PWR stuff, since I won't be able to test the camera until the memory side of espcamera is fine.
I will open a seperate issue, probably tomorrow.