Arducam Imaging Instructions

Connecting the Camera and Arduino

  1. Plug the Arducam Shield into the Arduino Mega and the camera into the Arducam Shield

    1. Make sure that the pins are correctly aligned when plugging each device together. Every pin on the Arduino Mega and the Arducam Shield is labelled and should be inserted into the corresponding location. (EG VIN goes into VIN, etc)

    2. When plugging the camera into the Arducam shield, note that the camera has 22 pins but only pins 1 to 20 are used. Both the camera and shield have pins 1 and 2 labelled. The camera has pins 21 and 22 labelled while the shield has pins 19 and 20 labelled.


Camera Pins (back face)

Arducam Shield Pins (front face)

Note: Camera Pin labels are on the opposite side of the pins

If using the wires to plug the camera into the shield (instead of plugging them into each other directly) use the long wires to plug VCC and GND in and the short wires for all other pins. This is because VCC (power in) and GND (ground) do not communicate data, only supply power. The other wires are for communication and if they are different lengths not-in-sync issues may arise.


Installing the Software

  1. Download the Arduino software from https://www.arduino.cc/en/main/software.

  2. Move the file in one of the two SD cards to C:\Users\username\Documents\Arduino\libraries”.

  3. Run the Arduino software.

Setting Up the Code and IDE

  1. Connect the Arduino to the computer using the USB cable.

  2. Correct the following items in the Tools.

Port should be set to the one that the Arduino is plugged into.


Board should be “Arduino Mega or Mega 2560”


Processor should be “Atmega2560 (Mega 2560)"

Programmer should be “ArduinoISP”




Running the Code

  1. The code should already be loaded onto the Arduino, and you should not need to “verify” or“Upload ” any code.

    1. However, if the code isn’t working, it may need to be refreshed on the Arduino. If so, and you moved the files from the flash drive in step 3, you will find the JPEG imaging code in the following folder. Otherwise, it will be on one of the two SD cards. ….\Documents\Arduino\libraries\ArduCAM\examples\Shield_V2\ArduCAM_Shield_V2_MT9D111_Camera_JPEG

    2. Open the above code, and then press Verify (circled red) and then Upload (circled blue) as shown in the following image

  1. In the Arduino software, go to Tools -> serial monitor.


  1. You should see the following window.

  2. Set the baud rate to 115200 and wait a couple seconds. Then you see some commands.

    1. If you see a command saying “SD Card failed to load” or similar

      1. Unplug the Arduino

      2. Remove the SD card and reinsert it

      3. Plug the Arduino back in

      4. Re-open the serial monitor

      5. If the SD card continues to fail to load, try the second SD card

  1. When you see “init done”, Press the shutter button. Then you see the “af_refocus” command.

  1. Wait few seconds. You will see some odd commands. Afterwards, you will see the “grab done” command. This CAN take up to a few minutes so don’t panic if it doesn’t finish right away. Matt: I think sometimes the JPEG compression algorithm has troubles which make it take longer to process

  1. Now, you are good. First unplug the USB cable. Then, remove the SD card and insert it to the SD reader. Insert the flash drive to the computer. Now you have the Image!

  2. To take additional pictures, make sure to close and reopen the Serial Monitor each time.