Maker Pro

Setting Up OpenMV Cam

December 28, 2019 by Utsource Parts

Easy-Peasy tutorial for setting up the OpenMV Cam


If you are new to the affordable OpenMV community, you may be confused about where to start, here I will show you what are the first steps you should take.

Let's get started!

In this tutorial, I will be using OpenMV M7 which is a predecessor of new OpenMV H7, but as far as setting up the things go, processes for both the camera modules are the same.

According to the OpenMV website:

"Ibrahim created the OpenMV project back in 2013 In Search of a Better Serial Camera Module. His goal was to build a small, affordable, and expandable machine vision module. Over time the project grew from his blog to a Hackaday Project, then to a KickStarter, and finally to what it is today."

Following is the Link for official OpenMV documentation:

WhatsApp Image 2019-12-28 at 6.53.45 AM.jpeg

The Pinout of OpenMV

The following photograph shows the pinout of the OpenMV cam, however, we will just be using the Micro USB port on the camera for this tutorial, and in the upcoming subsequent tutorials, I will show you some more inbuilt example and some custom functionalities.


Pinout of OpenMV

Downloading the OpenMV IDE

Open MV IDE is a very interactive and well-built piece of software, the complete programming process involves the usage of MicroPython, which is an opensource language developed for programming microcontroller with much easier python-like syntax instead of syntax-heavy C or C+

Following are some words from OpenMV official documentation:

"Let’s talk about OpenMV IDE now. OpenMV IDE is the tool you’ll be using to program your OpenMV Cam with. It features a powerful text editor powered by QtCreator, a frame buffer viewer, histogram display, and an integrated serial terminal for debugging output from your OpenMV Cam.

Anyway, the IDE is more or less straight forward to use. A lot of effort was put into stream-line things in the IDE. However, there are a few things you should know about in the IDE."

Download the OpenMV IDE from here


OpenMV IDE logo

Connect the Camera to Computer Via Micro USB

The way your computer communicates to OpenMV is via the Micro USB to USB cable, the connection is really beginner-friendly and straight forward, you just need to connect one end of Micro USB cable onto the camera module and the other to the Computer. 

WhatsApp Image 2019-12-28 at 6.35.40 AM.jpeg
WhatsApp Image 2019-12-28 at 6.35.41 AM.jpeg


As mentioned above, the IDE is used to program OpenMV via MicroPython, this is particularly easy, after connecting the boart to the computer, just click on the 'Connecter Cables Icon' in the bottom left of the IDE,  and also click on that little play button, and voila! you are now using Machine Vision, you should see what the camera is processing on the frame buffer on the top right. This is the hello world program that you just uploaded to the module.

That is it for now, I will be coming with more interesting projects with OpenMV in future, so stay tuned!

Thanks For Reading!

openmv ide.png
# Hello World Example
# Welcome to the OpenMV IDE! Click on the green run arrow button below to run the script!

import sensor, image, time

sensor.reset()                      # Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA)   # Set frame size to QVGA (320x240)
sensor.skip_frames(time = 2000)     # Wait for settings take effect.
clock = time.clock()                # Create a clock object to track the FPS.

    clock.tick()                    # Update the FPS clock.
    img = sensor.snapshot()         # Take a picture and return the image.
    print(clock.fps())              # Note: OpenMV Cam runs about half as fast when connected
                                    # to the IDE. The FPS should increase once disconnected.


Utsource Parts

share how to, diy, homemade, circuit design and new project ideas.

Related Content


You May Also Like