|
Forum Index : Microcontroller and PC projects : A new PicoMite Camera - 2-Megapixel OV2640
| Author | Message | ||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11546 |
Version 6.03.00RC25 onwards will have support for the OV2640 camera module that is now ubiquitous and a significant update from the OV7670 that has been supported in multiple versions of MMbasic. ![]() The OV2640 support is available on all RP2350 builds except VGA, VGAUSB and HDMIWEB. For the HDMI and HDMI builds you must be in mode 4 (RGB555) to use the camera. For the PicoMite builds you will need a connected SPI display (with working MISO) and have enough memory free for the firmware to allocate a 153600 byte buffer in main ram (not PSRAM). The basic resolution used is 320x240 RGB565 - hence the 153600 byte buffer and the firmware supports capture of images at that resolution and an image change algorithm that will detect motion in the camera field. All good so far BUT the PicoMite OV2640 firmware also supports jpeg capture in resolutions up to 1600x1200. This allows for a trivial program that can monitor the visual fields for movement and then capture the image in much higher resolution. Here is the manual entry for the new firmware There is also a minor enhancement to the LOAD JPG command to allow images to be downscaled to making reviewing easier. Taken together, these changes allow a simple motion detection program 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 gp20,gp21,gp22,gp26,gp27,gp0 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 Here is a sample image taken at 1600x1200 using my HDMIUSB reference board to control the camera ![]() |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 1964 |
Do you know if these cameras are IR sensitive, Pete? I only got a definite maybe from AI. |
||||
| al18 Senior Member Joined: 06/07/2019 Location: United StatesPosts: 240 |
Nice. I see Amazon has the camera on sale for $7.99 during Prime days. On your picture, it looks like the red color of the camera PCB is being displayed as pink. The blue of the JLCPCB box and the green Raspberry Pico 2 looks correct. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11546 |
I think they may have an IR filter but if so it is a crap one (tested with a TV remote). I couldn't get good pictures looking outside but, of course, the weather here is very hot, bright and hazy so not a good test. Agreed, there are a gazillion registers you can change on these things to tune the colour but this could also be affected by the IR issue. I'm waiting on some IR filters to see if that improves things. |
||||
Bryan1![]() Guru Joined: 22/02/2006 Location: AustraliaPosts: 2105 |
So Peter does this new camera work with a 2350-2W webmite and if so now I got the wifi fixed around the farm it would be nice to get that project done so expect plenty off kangaroo pictures to come up. Regards Bryan |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11546 |
The camera can be used on the 2350-2W webmite assuming you have enough pins free. Must be fun having kangaroos to see, all I get is the neighbours cats crapping in the vegetable bed Edited 2026-06-25 17:55 by matherp |
||||
TassyJim![]() Guru Joined: 07/08/2011 Location: AustraliaPosts: 6539 |
Chasing them out of the vege garden every morning is good exercise. Even more exciting is getting a Tassy Devil out of the bathroom. VK7JH MMedit |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11546 |
Different world |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |