Main Site Documentation

Camera ERROR


#1

My Camera seem has some trouble.

I simply test this, but

output shows

Using mainboard GHI Electronics FEZSpider version 1.0
Camera ERROR : Unable to take picture. Camera is not ready. Is the Camera connected?
Program Started

I am sure the Camera is connected and I have changed the wire. The result is the same.


 public partial class Program
    {
        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
        {
           

            camera.TakePicture();
            camera.PictureCaptured += new Camera.PictureCapturedEventHandler(camera_PictureCaptured);
            // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started");
        }

        void camera_PictureCaptured(Camera sender, GT.Picture picture)
        {
            Debug.Print("Picture Captured");
        }
    }

#2

You have to make sure that camera is connected/ready first. Check this tutorial, it shows how to do that:
http://wiki.tinyclr.com/index.php?title=Gadgeteer_Camera


#3

Thank you.

I change the code and use external power.

but the connected event not fired.

Output is

The thread ‘’ (0x2) has exited with code 0 (0x0).
Using mainboard GHI Electronics FEZSpider version 1.0
Program Started
The thread ‘’ (0x3) has exited with code 0 (0x0).


        void ProgramStarted()
        {
         
          
            camera.CameraConnected += new Camera.CameraConnectedEventHandler(camera_CameraConnected);
            camera.PictureCaptured+=new Camera.PictureCapturedEventHandler(camera_PictureCaptured);
            // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started");
        }

        void camera_CameraConnected(Camera sender)
        {
            camera.TakePicture();
        }

        void camera_PictureCaptured(Camera sender, GT.Picture picture)
        {
            Debug.Print("Picture Captured");
            camera.TakePicture();
        }


#4

Ok. In that case first step would be to see if Camera shows up in Device Manager. You can connect it to your PC through the power module:

http://wiki.tinyclr.com/index.php?title=Gadgeteer_Camera#Camera_Hardware_Troubleshooting

Check that first.


#5

I have checked the link already and the camera is fine in my PC.


#6

@ Tzu Hsuan - I see you had that issue before

http://www.tinyclr.com/forum/topic?id=5871&page=2

Did you get it working at that time? Is it the same camera module?


#7

OK , stupid, I plug into wrong socket.
Its works now.

But do other test. some thing interesting.

I f i add the SD Card module and the camera in the same time, the camera do not work.
But after i remove the SD Card module the camera works well.

Whats wrong ?


#8

Power issue?


#9

@ Architect , I will check it next week then report here.

@ andre.m

The issue seems not be solved?


#10

@ Architect: Add the external power , the same, camera not work with the SD card.
@ andre.m" Not works.

And even the camera.CameraReady shows true, the CameraConnected event not fire anymore.

Does GHI or anyone can test it for me? very strange.
By the way, I am using Spider.

    public partial class Program
    {
        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
        {
          
            // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started");

            camera.CameraConnected += new Camera.CameraConnectedEventHandler(camera_CameraConnected);
            camera.PictureCaptured += new Camera.PictureCapturedEventHandler(camera_PictureCaptured);
            bool ve = camera.CameraReady;
            Debug.Print(ve.ToString());
        }

        void camera_PictureCaptured(Camera sender, GT.Picture picture)
        {
            Debug.Print("Carema test"); 
        }

        void camera_CameraConnected(Camera sender)
        {
            Debug.Print("Carema test");
            camera.TakePicture();
        }

        
    }