Problem with SerialCamera L1

Hi,

I am trying to do some work with the serial camera L1 but the “serialCameraL1.NewImageReady” Property is always 0. I am working with a FEZ Hydra with Version 4.3 and the 2014 R5 SDK.

Here is my whole code. Any help would be appreciated.

public partial class Program
    {
        private readonly GT.Timer _timer = new GT.Timer(5000);
  
        void ProgramStarted()
        {
            serialCameraL1.StartStreaming();

            _timer.Tick += _timer_Tick;
            _timer.Start();
        }

        void _timer_Tick(GT.Timer timer)
        {
            _timer.Stop();

            if (serialCameraL1.NewImageReady)
            {
                var image = serialCameraL1.GetImage();
                Debug.Print("Image Size " + image.Height + "x" + image.Width);
                image.Dispose();
            }

            _timer.Start();
        }
    }

Regards,
Michael

Try to stop timer inside if close

Hi Alex,

thanks for this suggestion but the problem persists.
Any other ideas?

Michael

First, try the example in https://www.ghielectronics.com/docs/176/serial-camera-module .

They poll the camera every 100ms. You are polling every 5 seconds.

Since you are streaming, it is possible that the image is ready, and then goes not ready as it starts the next picture.

Does the camera class have an event when an image is ready?

1 Like

Hi Mike,

that was the case. Great and thanks for your help.

Michael