ArduCAM / Arduino

This is ArduCAM library for Arduino boards
MIT License
469 stars 347 forks source link

Library issues with Platform IO Development #290

Open buschnyj opened 6 years ago

buschnyj commented 6 years ago

Hello.

To start, I need some clarification: What do 'ARDUCHIP_TIM' and 'MODE_MASK' refer to? I understand that, say, in the case of mycam.write(), they refer to a location and data. However, where do the names come from.

To build on the above, I am running local Arducam Directory as such:

my_project_folder -> lib -> Arducam

I've attached my code below:

Thank you.

#include <Arduino.h>

// available at arducam.com.

#include <SPI.h>
#include <Wire.h>
#include <ArduCAM.h>

const char bmp_header[54] PROGMEM =
{
      0x42, 0x4D, 0x36, 0x58, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00,
      0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x00,
      0x00, 0x00, 0x00, 0x58, 0x02, 0x00, 0xC4, 0x0E, 0x00, 0x00, 0xC4, 0x0E, 0x00, 0x00, 0x00, 0x00,
      0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

#define SD_CS 9
#define BMPIMAGEOFFSET 54
const int CS = 10; // define pin 10
ArduCAM myCAM(OV2640, CS);  // Remember to change the model parameter to suit your canera module!

void setup()
{
  //Initialize I2C Bus
  Wire.begin();
  //Switch to FIFO Mode
  myCAM.write_reg(ARDUCHIP_TIM, MODE_MASK);
  //Initialize Camera Module
  myCAM.InitCAM();
}

void loop()
{
  //loop code goes here
}
supprot commented 6 years ago

@buschnyj Hi, You can find definition in the ArduCAM.h file

For what they mean, please refer to this document www.arducam.com/downloads/shields/ArduCAM_Camera_Shield_Software_Application_Note.pdf