e.Button will return the button itself and you are trying to assign this to a uint. You need to expand the e.Button to something that is uint. Check it’s parameters to find the correct one you want. My system is not up and running so I can’t check what they are
Hard to translate to english, but this is what i came up with:
The name “irreceiver” is not existing in the current context.
2/3. The Type- or Namespacename “IR_Receiver” could not be found. (Missing a Using-Direktive or Assembly reference)
Then please show us the content of the entire program.cs file. Seems like in your copying you’ve left something out, or named it something different. In fact, can you check what the IR Receiver is called in the designer ?
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 GadgeteerApp6
{
public partial class Program
{
void ProgramStarted()
{
irreceiver.IREvent += new IR_Receiver.IREventDelegate(irreceiver_IREvent);
}
void irreceiver_IREvent(object sender, IR_Receiver.IREventArgs e)
{
}
}
}
please bear in mind im new to programming, we started in school with c# and .net microframework.
This is the content of the program.generated.cs file:
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.18034
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GadgeteerApp6 {
using Gadgeteer;
using GTM = Gadgeteer.Modules;
public partial class Program : Gadgeteer.Program {
private Gadgeteer.Modules.GHIElectronics.IR_Receiver irReceiver;
public static void Main() {
// Important to initialize the Mainboard first
Program.Mainboard = new GHIElectronics.Gadgeteer.FEZCerberus();
Program p = new Program();
p.InitializeModules();
p.ProgramStarted();
// Starts Dispatcher
p.Run();
}
private void InitializeModules() {
this.irReceiver = new GTM.GHIElectronics.IR_Receiver(3);
}
}
}