treim-de / bpim2z-ov5640

Banana Pi M2 Zero Image with working ov5640 camera module and autofocus
2 stars 0 forks source link

BPI M2 Zero with auto-focussing OV5640!

Hi, you are looking at the configuration of an image with a working OV5640 camera sensor including auto focus for the Banana Pi M2 Zero!

The DTS-Files have to be copied to arch/arm/boot/dts/ and the ov5640.c file replaces the one at drivers/media/i2c/.

Alternatively, you can apply the patch in this repo which combines all changes.

If you are like me and trust random strangers on the internet, I uploaded a freshly built image with the following specs:

Note that there are no hardware changes necessary to enable auto focus on the BPI (unlike some Youtube videos suggest)!

Camera preview

To check if everything is working you can install the following packages:

Please read this section to learn how to get started and which camera to use.

After you set the resolution you can use

ffplay /dev/video1 -video_size <resolution>

to view a live feed.

Thanks to:

Disclaimer

The driver took me hours to adapt from various sources on the internet and it works well for my use cases, but I have no experience building drivers (which is probably why it took so long) nor do I regularly compile kernels. Usage is at your own risk!

If you have any doubts about this image or this driver feel free to adapt it to your needs and build your own images :) If you make improvements please do notify me as I happily apply them.