I’ve been looking for the Relay X1 Driver and found this info:
The Relay X1 Module was released after the SDK so no Gadgeteer driver or Gadgeteer Designer information is in the SDK. A driver class is included in the Developers’ Guide
but actually, there is no driver class like it says
Someone downloaded it before it disappeared?
Chokaaay, had to split up the variabe declaration a bit, but it’s working <3
namespace GadgeteerApp1
{
public partial class Program
{
Gadgeteer.Socket socketNr = GT.Socket.GetSocket(6, true, null, "");
OutputPort relay;
// This method is run when the mainboard is powered up or reset.
void ProgramStarted()
{
Debug.Print("Program Started");
button.ButtonPressed += new GTM.GHIElectronics.Button.ButtonEventHandler(button_ButtonPressed);
relay = new OutputPort(socketNr.CpuPins[5], false);
}
void button_ButtonPressed(GTM.GHIElectronics.Button sender, GTM.GHIElectronics.Button.ButtonState state)
{
relay.Write(true);
//throw new NotImplementedException();
}
}
How do you ppl figure out in which “format” the numbers and so on must be?
I mean, how you know it must be CpuPins[5] and not Cpu.Pin 5 or anything else?