Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 49edbbf

Browse files
feat: add camera sensor bf3005 support (espressif#350)
BF3005 is a VGA CMOS Image Sensor. The sensor is well stocked and comes with a series of image processing functions. The support for this sensor is added here to facilitate the use of this sensor by more people. PTAL,Thanks.
1 parent 99fe5ae commit 49edbbf

File tree

9 files changed

+930
-1
lines changed

9 files changed

+930
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET ST
1313
sensors/gc0308.c
1414
sensors/gc2145.c
1515
sensors/gc032a.c
16+
sensors/bf3005.c
1617
conversions/yuv.c
1718
conversions/to_jpg.cpp
1819
conversions/to_bmp.c

Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ menu "Camera configuration"
6262
help
6363
Enable this option if you want to use the GC0308.
6464
Disable this option to save memory.
65+
66+
config BF3005_SUPPORT
67+
bool "Support BF3005(BYD3005) VGA"
68+
default y
69+
help
70+
Enable this option if you want to use the BF3005.
71+
Disable this option to save memory.
6572

6673
choice SCCB_HARDWARE_I2C_PORT
6774
bool "I2C peripheral to use for SCCB"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ This repository hosts ESP32 series Soc compatible driver for image sensors. Addi
2424
| GC032A | 640 x 480 | color | YUV/YCbCr422<br/>RAW Bayer<br/>RGB565 | 1/10" |
2525
| GC0308 | 640 x 480 | color | YUV/YCbCr422<br/>RAW Bayer<br/>RGB565 | 1/6.5" |
2626
| GC2145 | 1600 x 1200 | color | YUV/YCbCr422<br/>RAW Bayer<br/>RGB565 | 1/5" |
27+
| BF3005 | 640 x 480 | color | YUV/YCbCr422<br/>RAW Bayer<br/>RGB565 | 1/4" |
2728

2829
## Important to Remember
2930

driver/esp_camera.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
#if CONFIG_GC0308_SUPPORT
5555
#include "gc0308.h"
5656
#endif
57-
57+
#if CONFIG_BF3005_SUPPORT
58+
#include "bf3005.h"
59+
#endif
5860

5961
#if defined(ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
6062
#include "esp32-hal-log.h"
@@ -114,6 +116,9 @@ static const sensor_func_t g_sensors[] = {
114116
#if CONFIG_GC0308_SUPPORT
115117
{gc0308_detect, gc0308_init},
116118
#endif
119+
#if CONFIG_BF3005_SUPPORT
120+
{bf3005_detect, bf3005_init},
121+
#endif
117122
};
118123

119124
static esp_err_t camera_probe(const camera_config_t *config, camera_model_t *out_camera_model)

driver/include/sensor.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ typedef enum {
2626
GC2145_PID = 0x2145,
2727
GC032A_PID = 0x232a,
2828
GC0308_PID = 0x9b,
29+
BF3005_PID = 0x30,
2930
} camera_pid_t;
3031

3132
typedef enum {
@@ -38,6 +39,7 @@ typedef enum {
3839
CAMERA_GC2145,
3940
CAMERA_GC032A,
4041
CAMERA_GC0308,
42+
CAMERA_BF3005,
4143
CAMERA_MODEL_MAX,
4244
CAMERA_NONE,
4345
} camera_model_t;
@@ -52,6 +54,7 @@ typedef enum {
5254
GC2145_SCCB_ADDR = 0x3C,// 0x78 >> 1
5355
GC032A_SCCB_ADDR = 0x21,// 0x42 >> 1
5456
GC0308_SCCB_ADDR = 0x21,// 0x42 >> 1
57+
BF3005_SCCB_ADDR = 0x6E,
5558
} camera_sccb_addr_t;
5659

5760
typedef enum {

driver/sensor.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const camera_sensor_info_t camera_sensor[CAMERA_MODEL_MAX] = {
1212
{CAMERA_GC2145, "GC2145", GC2145_SCCB_ADDR, GC2145_PID, FRAMESIZE_UXGA, false},
1313
{CAMERA_GC032A, "GC032A", GC032A_SCCB_ADDR, GC032A_PID, FRAMESIZE_VGA, false},
1414
{CAMERA_GC0308, "GC0308", GC0308_SCCB_ADDR, GC0308_PID, FRAMESIZE_VGA, false},
15+
{CAMERA_BF3005, "BF3005", BF3005_SCCB_ADDR, BF3005_PID, FRAMESIZE_VGA, false},
1516
};
1617

1718
const resolution_info_t resolution[FRAMESIZE_INVALID] = {

0 commit comments

Comments
 (0)