Skip to main content

Class Arducam

Base class for the Arducam family of cameras

Assembly: Arducam.dll​

View Source

This introduction describes the published Meadow 2.5.0 API. The production reference below is generated from that release.

API Reference​

Class Arducam

Base class for the Arducam family of cameras

Assembly: Arducam.dll​
View Source​
Declaration
public abstract class Arducam : IPhotoCamera, ISpiPeripheral, II2cPeripheral

Derived:
Meadow.Foundation.Sensors.Camera.ArducamMini2MP

Implements:
Meadow.Peripherals.Sensors.Cameras.IPhotoCamera, Meadow.Hardware.ISpiPeripheral, Meadow.Hardware.II2cPeripheral

Properties​

CurrentImageFormat​

The current image format for capturing photos

View Source​
Declaration
protected Arducam.ImageFormat CurrentImageFormat { get; set; }

MAX_FIFO_SIZE​

The maximum amount of data that can be read from the camera memory

View Source​
Declaration
protected virtual uint MAX_FIFO_SIZE { get; }

DefaultSpiBusSpeed​

The default SPI bus speed for the device

View Source​
Declaration
public Frequency DefaultSpiBusSpeed { get; }

SpiBusSpeed​

The SPI bus speed for the device

View Source​
Declaration
public Frequency SpiBusSpeed { get; set; }

DefaultSpiBusMode​

The default SPI bus mode for the device

View Source​
Declaration
public SpiClockConfiguration.Mode DefaultSpiBusMode { get; }

SpiBusMode​

The SPI bus mode for the device

View Source​
Declaration
public SpiClockConfiguration.Mode SpiBusMode { get; set; }

DefaultI2cAddress​

The default I2C bus for the camera

View Source​
Declaration
public byte DefaultI2cAddress { get; }

Fields​

spiComms​

SPI Communication bus used to communicate with the peripheral

View Source​
Declaration
protected readonly ISpiCommunications spiComms

i2cComms​

I2C Communication bus used to communicate with the peripheral

View Source​
Declaration
protected readonly II2cCommunications i2cComms

ARDUCHIP_TEST1​

The camera test register

View Source​
Declaration
protected const byte ARDUCHIP_TEST1 = 0

ARDUCHIP_FRAMES​

The number of frames to capture (0 based)

View Source​
Declaration
protected const byte ARDUCHIP_FRAMES = 1

Methods​

Initialize()​

Initializes the camera module

View Source​
Declaration
protected abstract Task Initialize()
Returns​

System.Threading.Tasks.Task

Reset()​

Resets the camera

View Source​
Declaration
protected void Reset()

Validate()​

Validates the camera connection

View Source​
Declaration
protected abstract Task Validate()
Returns​

System.Threading.Tasks.Task

CapturePhoto()​

Captures a photo and returns the image data

View Source​
Declaration
public Task<byte[]> CapturePhoto()
Returns​

System.Threading.Tasks.Task<System.Byte[]>

FlushFifo()​

Clears the FIFO buffer

View Source​
Declaration
protected void FlushFifo()

ClearFifoFlag()​

Clears the FIFO buffer

View Source​
Declaration
protected void ClearFifoFlag()

ReadRegister(byte)​

Read an SPI register

View Source​
Declaration
protected byte ReadRegister(byte address)
Returns​

System.Byte

Parameters​
TypeName
System.Byteaddress

GetBit(byte, byte)​

Get the value of a single bit from a byte

View Source​
Declaration
protected byte GetBit(byte address, byte bit)
Returns​

System.Byte

Parameters​
TypeName
System.Byteaddress
System.Bytebit

SetMode(byte)​

Set the camera mode

View Source​
Declaration
protected void SetMode(byte mode)
Parameters​
TypeName
System.Bytemode

SetJpegSize(ImageSize)​

Set the jpeg capture resolution

View Source​
Declaration
public abstract Task SetJpegSize(Arducam.ImageSize size)
Returns​

System.Threading.Tasks.Task

Parameters​
TypeName
Meadow.Foundation.Sensors.Camera.Arducam.ImageSizesize

SetImageFormat(ImageFormat)​

Set the capture image format

View Source​
Declaration
protected void SetImageFormat(Arducam.ImageFormat format)
Parameters​
TypeName
Meadow.Foundation.Sensors.Camera.Arducam.ImageFormatformat

WriteRegister(byte, byte)​

Write an SPI register

View Source​
Declaration
protected void WriteRegister(byte address, byte data)
Parameters​
TypeName
System.Byteaddress
System.Bytedata

ReadSensorRegister(byte)​

Read an I2C register

View Source​
Declaration
protected byte ReadSensorRegister(byte regID)
Returns​

System.Byte

Parameters​
TypeName
System.ByteregID

WriteSensorRegister(byte, byte)​

Write an I2C register

View Source​
Declaration
protected void WriteSensorRegister(byte register, byte value)
Parameters​
TypeName
System.Byteregister
System.Bytevalue

WriteSensorRegisters(SensorReg[])​

Write an array of I2C registers Used for camera configuration

View Source​
Declaration
protected void WriteSensorRegisters(Arducam.SensorReg[] registerList)
Parameters​
TypeName
Meadow.Foundation.Sensors.Camera.Arducam.SensorReg[]registerList

Implements​

  • Meadow.Peripherals.Sensors.Cameras.IPhotoCamera
  • Meadow.Hardware.ISpiPeripheral
  • Meadow.Hardware.II2cPeripheral