Skip to main content

Meadow.Foundation.Sensors.Camera.ArducamMini

ArducamMini
StatusStatus badge: in-progress
Source codeGitHub
Datasheet(s)GitHub
NuGet packageNuGet Gallery for Meadow.Foundation.Sensors.Camera.ArducamMini
public MeadowApp()
{
Console.WriteLine("Creating output ports...");

var camera = new ArducamMini(Device, Device.CreateSpiBus(), Device.Pins.D00, Device.CreateI2cBus());

Thread.Sleep(1000);

Console.WriteLine("Attempting single capture");
camera.FlushFifo();
camera.ClearFifoFlag();
camera.StartCapture();

Console.WriteLine("Capture started");

Thread.Sleep(1000);

if(camera.IsCaptureComplete())
{
Console.WriteLine("Capture complete");

var data = camera.GetImageData();

Console.WriteLine($"Jpeg captured {data.Length}");
}
}

Sample project(s) available on GitHub

|

Code Example

ArducamMini camera;

public override async Task Initialize()
{
Console.WriteLine("Initialize...");

var spiBus = Device.CreateSpiBus(new Meadow.Units.Frequency(8, Meadow.Units.Frequency.UnitType.Megahertz));
camera = new ArducamMini(Device, spiBus, Device.Pins.D00, Device.CreateI2cBus());

await Task.Delay(1000);
}

public override Task Run()
{
Console.WriteLine("Attempting single capture");
camera.FlushFifo();
camera.FlushFifo();
camera.CapturePhoto();

Console.WriteLine("Capture started");

Thread.Sleep(1000);

if (camera.IsPhotoAvaliable())
{
Console.WriteLine("Capture complete");

var data = camera.GetImageData();

Console.WriteLine($"Jpeg captured {data.Length}");
}

return Task.CompletedTask;
}

Sample project(s) available on GitHub