v.lenzer
 Senior Member
 Joined: 04/05/2024 Location: GermanyPosts: 152 |
| Posted: 02:49pm 05 Aug 2026 |
|
|
|
For a quick-and-dirty solution, I soldered two 4.7k resistors in parallel. The pull-up value is now 2.3k ohms. Unfortunately, the same error message appears.
Here the program:
Motion-detector 'by Peter Mather, the back shed-forum 'PicoMite MMBasic RP2350B V6.03.00 'OPTION SYSTEM SPI GP6,GP3,GP4 'OPTION SYSTEM I2C GP38,GP39 'OPTION FLASH SIZE 16777216 'OPTION COLOURCODE ON 'OPTION PICO OFF 'OPTION CPUSPEED (KHz) 200000 'OPTION LCDPANEL ILI9341, LANDSCAPE,GP7,GP2,GP5 'OPTION TOUCH GP14,GP15 'GUI CALIBRATE 0, 137, 268, 897, 666 'OPTION SDCARD GP8 'OPTION PSRAM PIN GP47 Option explicit Option default none Dim float ch Dim imag%(320*240\8-1) Dim s$ If Instr(MM.DEVICE$,"HDMI") Then Mode 4 Drive "b:" Camera open ov2640 gp40,gp41,gp42,gp43,gp44,gp30 do while inkey$="" camera capture loop Do Camera change imag%(),ch' initialise the change image Do Camera change imag%(),ch,1 Loop Until ch>10 s$="Movement" Inc s$, LEFT$(Date$,2)+Mid$(Date$,4,2)+RIGHT$(Date$,2) Inc s$," "+LEFT$(Time$,2)+Mid$(Time$,4,2)+RIGHT$(Time$,2)+".jpg" Camera capture jpeg s$,sxga Load jpg s$,,,,,4 Pause 2000 Loop
do while inkey$="" camera capture loop
This is just there to view and check the image in color.
do while inkey$="" camera capture loop
This is just there to view and check the image in color.
A JPG file named "Movement ...." is created. However, the file is 0 bytes in size.

Or could it be that I configured the I2C interface incorrectly? I entered `OPTION SYSTEM I2C GP38,GP39`. However, GP38/39 correspond to I2C2. Or does that not matter? Edited 2026-08-06 01:00 by v.lenzer |