File tree Expand file tree Collapse file tree 1 file changed +21
-6
lines changed Expand file tree Collapse file tree 1 file changed +21
-6
lines changed Original file line number Diff line number Diff line change 98
98
# a popular camera module for embedded systems. This example uses a PIO
99
99
# driver, which is a peripheral interface only available on Raspberry Pi RP2
100
100
# processors
101
- from cv2_drivers .cameras import hm01b0_pio
101
+ import cv2_drivers .cameras as cameras
102
102
103
103
# Create a camera object. This will depend on the camera driver you are
104
104
# using, and you may need to adjust the parameters based on your specific
105
105
# camera and board configuration
106
- camera = hm01b0_pio .HM01B0_PIO (i2c ,
107
- pin_d0 = 12 ,
108
- pin_vsync = 13 ,
109
- pin_hsync = 14 ,
110
- pin_pclk = 15 )
106
+ camera = cameras .hm01b0_pio .HM01B0_PIO (
107
+ i2c ,
108
+ pin_d0 = 12 ,
109
+ pin_vsync = 13 ,
110
+ pin_hsync = 14 ,
111
+ pin_pclk = 15 ,
112
+ pin_xclk = None , # Optional xclock pin, specify if needed
113
+ num_data_pins = 1 # Number of data pins used by the camera (1, 4, or 8)
114
+ )
115
+
116
+ # camera = cameras.ov5640_pio.OV5640_PIO(
117
+ # i2c,
118
+ # pin_d0=8,
119
+ # pin_vsync=22,
120
+ # pin_hsync=21,
121
+ # pin_pclk=20,
122
+ # pin_xclk=None # Optional xclock pin, specify if needed
123
+ # )
111
124
except ImportError :
112
125
print ("boot.py - Camera driver module not found, skipping camera initialization." )
126
+ except OSError :
127
+ print ("boot.py - Camera initialization failed, skipping camera initialization." )
You can’t perform that action at this time.
0 commit comments