Access an ESP32 camera module from the desktop

      Comments Off on Access an ESP32 camera module from the desktop

If you have a Raspberry Pi and wish to attach a camera to it there are a number of options available to you – including from the Raspberry Pi Foundation themselves – but if you wish to use one with RISC OS, your options are considerably more limited. So limited, in fact, that until very recently I don’t think there was a working option.

As of mid-May, however, that changed thanks to Rick Murray.

If you have a device based around the ESP32-Cam module from Ai-Thinker (itself built on a System-on-a-Chip from Espressif Systems), which uses an OV2640 2-megapixel sensor and runs the CameraWebServer firmware available via the Arduino IDE, Rick has written an application just for you.

In theory, a capable web browser can connect to the camera – but while the new Iris browser from RISC OS Developments will fit the bill, it’s still in a test phase so not yet widely available, and other options such as Otter and QupZilla are very large (and probably too slow) so won’t work on the original 256MB Pi – a problem that, to be fair, may be true with Iris as well. The other obvious choice is NetSurf, but its scripting capabilities aren’t (yet?) good enough.

This prompted Rick to take advantage of a recent long weekend to develop ESP32Cam, an application to interface with ESP32-Cam module, and allow you to see what it sees in the RISC OS desktop.

The program presents a window that acts as an image viewer onto the camera, along with a toolbar – with the option to switch to a smaller toolbar (with fewer options available). Using the toolbar, you can apply a number of options to the image, such as flipping it horizontally or vertically, increasing or decreasing the contrast, and so on – and, of course, you can ‘Capture’ the image, which saves it in the root directory on whatever device the application is running (sequentially numbered to avoid overwrites).