s60sc / ESP32-CAM_MJPEG2SD

ESP32 Camera motion capture application to record JPEGs to SD card as AVI files and stream to browser as MJPEG. If a microphone is installed then a WAV file is also created. Files can be uploaded via FTP or downloaded to browser.
GNU Affero General Public License v3.0
931 stars 214 forks source link

I2c improvments #491

Closed rjsachse closed 1 month ago

rjsachse commented 1 month ago
s60sc commented 1 month ago

Interesting. I'll need to take time to review it. Most of the files used by this app are generic so shared with my other apps both public and private. One of my other public apps uses a separate I2C file https://github.com/s60sc/ESP32_RFID_Reader/blob/master/periphsI2C.cpp

rjsachse commented 1 month ago

I like your approach too, my thought that if someone want to add another i2c device that the functions are already available like initialize i2c, but only do it once like in my code. also, I can use the same i2c bus as the camera I have soldered to small wires on the esp32-cam and have working bme280 for telemetry. I also have a motorized IR filter that works with i2c. also a good idea to use GPIO multiplexer for extra pins like this one TCA9548A I2C Multiplexer and this library ESP32_IO_Expander

s60sc commented 1 month ago

I'm reworking periphsI2C.cpp to handle all the I2C related stuff, so I wont be able to incorporate the pull request as it stands but will acknowledge your contribution. Do you have an image of the mod you made to expose the cam I2C pins and a description that could be added to the readme

rjsachse commented 1 month ago

Yer the first 4 pins are power and i2c. Can't really take a photo at the moment as it is under a lot of electrical tape. No easy to solder the pins with the wire. Freenove boards expose the camera i2c pins. Thinking maybe to create a adapter board for the camera to expose the i2c so it could work with all boards. I have also tested on a esp32s3 using a 0v5640 breakout board but had to cut a trace to stop the 25hz signal as only supports 20hz. Could use something like this the expose the pins easy ov2640 extension here is the other board I'm using for breadboard testing
OV2640 Camera Module Adapter Board Module

s60sc commented 1 month ago

added to v10.3