How to show the camera Live on display_T35

Hi ,
I can take picture with camera and show It on display , but now I want to show camera video live on display ? how can I acheive this ? thx in advance

@ karamafrooz - you have not said which camera you are using. The USB or serial…

For the USB camera, program that display the image live when a button is pressed.

using System;
using System.Collections;
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;

namespace CodeCamp2013
    public partial class Program
        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
            camera.BitmapStreamed +=new GTM.GHIElectronics.Camera.BitmapStreamedEventHandler(camera_BitmapStreamed);
            button.ButtonPressed += new GTM.GHIElectronics.Button.ButtonEventHandler(button_ButtonPressed);
            button.ButtonReleased += new GTM.GHIElectronics.Button.ButtonEventHandler(button_ButtonReleased);

        void  camera_BitmapStreamed(GTM.GHIElectronics.Camera sender, Bitmap bitmap)
 	        display_T35.SimpleGraphics.DisplayImage(bitmap, 0, 0);

        void button_ButtonReleased(GTM.GHIElectronics.Button sender, GTM.GHIElectronics.Button.ButtonState state)

        void button_ButtonPressed(GTM.GHIElectronics.Button sender, GTM.GHIElectronics.Button.ButtonState state)
            camera.StartStreamingBitmaps(new Bitmap(camera.CurrentPictureResolution.Width, camera.CurrentPictureResolution.Height));

@ Mike - added your example to the Camera’s Developers’ Guide. Thanks!!!

@ karamafrooz -
could you teach me how to show a image on the TE35 display.
or more simple just show some words, please!!!~~~~
Thank you in advance.

hi a-pi (sorry, going to abbreviate it :))

The above code will show an image from the camera on the screen, but if you want to do anything else specifically you probably best asking your own question in your own thread. There is also the example code in the support → documents page, like that can help out.

@ a31415926 - try the section “Gadgeteer Test Code” in the CP7 Developers’ Guide:
Copy the code int ProgramStarted(), and subsitute the name of your display from the Gadgeteer Designer.

@ Mike -

Thanks alot ! nice answear

@ Jeff -
so cool, thank you very much!!!
you help me to save a lot of time!!

@ Brett -
how to make my own question? I don’t know ,I am new here. Could you teach me, thank you!

When you create a new thread, there is a checkbox that allow you to make it a technical question.

See the image below.

Go to the main page for the relevant forum (in this case, .NET Gadgeteer) and click the “Start a new topic” link, as indicated in the image.

1 Like

@ devhammer -
I got it!!! thanks a lot!!! U r so kind!