Hi,
I was running the example “GadgeteerCamera”, and codes is as follow:
using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Touch;
using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;
namespace GadgeteerCamera
{
public partial class Program
{
GT.Timer timer = new GT.Timer(2000);
// This method is run when the mainboard is powered up or reset.
void ProgramStarted()
{
button.ButtonPressed += new Button.ButtonEventHandler(button_ButtonPressed);
camera.PictureCaptured += new Camera.PictureCapturedEventHandler(camera_PictureCaptured);
timer.Tick += new GT.Timer.TickEventHandler(timer_Tick);
timer.Stop();
Debug.Print("Program Started");
}
void timer_Tick(GT.Timer timer)
{
camera.TakePicture();
}
void camera_PictureCaptured(Camera sender, GT.Picture picture)
{
display.SimpleGraphics.DisplayImage(picture,5,5);
}
void button_ButtonPressed(Button sender, Button.ButtonState state)
{
if (button.IsLedOn)
{
Debug.Print("Button Pressed timer.Stop();");
timer.Stop();
}
else
{
timer.Start();
Debug.Print("Button Pressed timer.Start();");
}
button.ToggleLED();
}
}
}
I found that after pressing the buttom I could see several pictures every 2 second from LCD at the beginning, but about 10 seconds later the errors came as follow:
Using mainboard GHIElectronics-FEZSpider version 1.0
Program Started
Button Pressed timer.Start();
Camera ERROR : Unable to take picture. The camera is already busy taking a picture.
Camera ERROR : Unable to take picture. The camera is already busy taking a picture.
Camera ERROR : Unable to take picture. The camera is already busy taking a picture.
Camera ERROR : Unable to take picture. The camera is already busy taking a picture.
Camera ERROR : Unable to take picture. The camera is already busy taking a picture.
Camera ERROR : Unable to take picture. The camera is already busy taking a picture.
Camera ERROR : Unable to take picture. The camera is already busy taking a picture.
why?
Does it mean that the camera runs too slowly?
How can I solve it?