Dear all,
I have the following very simple code to stream video to the LCD display in a Fez Spider GHI kit:
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.Presentation.Shapes;
using Microsoft.SPOT.Touch;
using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;
namespace CameraTest
{
public partial class Program
{
// This method is run when the mainboard is powered up or reset.
void ProgramStarted()
{
/*******************************************************************************************
Modules added in the Program.gadgeteer designer view are used by typing
their name followed by a period, e.g. button. or camera.
Many modules generate useful events. Type +=<tab><tab> to add a handler to an event, e.g.:
button.ButtonPressed +=<tab><tab>
If you want to do something periodically, use a GT.Timer and handle its Tick event, e.g.:
GT.Timer timer = new GT.Timer(1000); // every second (1000ms)
timer.Tick +=<tab><tab>
timer.Start();
*******************************************************************************************/
// Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
Debug.Print("Program Started");
camera.BitmapStreamed += camera_BitmapStreamed;
camera.CameraConnected += camera_CameraConnected;
button.ButtonReleased += button_ButtonReleased;
}
void button_ButtonReleased(Button sender, Button.ButtonState state)
{
Debug.Print("Button pressed");
}
void camera_CameraConnected(Camera sender, EventArgs e)
{
Debug.Print("Camera connected");
camera.StartStreaming();
}
void camera_BitmapStreamed(Camera sender, Bitmap e)
{
displayTE35.SimpleGraphics.DisplayImage(e, 0, 0);
}
}
}
The code works fine. However, after adding the ethernetJ11d module to the project and consequently this line is added to Program.generated.cs:
The camera does not connect, or rather, the callback function [em]camera_CameraConnected[/em] never gets called. Therefore, I can't use the camera while ethernetj11D is included in the project (I get camera not connected exceptions).
I am using Visual Studio 2012 Express on Windows 7 64 bits. This is the firmware I have:
Loader (TinyBooter) version information:
4.3.4.0 on this computer.
4.3.4.0 on this device.
>>> The Loader (TinyBooter) is up to date. <<<
Firmware (TinyCLR) version information:
4.3.6.0 on this computer.
4.3.6.0 on this device.
>>> The Firmware (TinyCLR) is up to date. <<<
Any help will be greatly appreciated!
Kind regards,
Federico