Fez cerb digital output?

Hey :smiley:

I want to set the DigitalOutput from my FEZ Cerberus Socket 7 (Y-Type) to ‘HIGH’ after I get values from Sensors.

After my research the code (C#) should be like:

GT.Socket socket = GT.Socket.GetSocket(7, true, null, null);
functionname = new GT.Interfaces.DigitalOutput(socket, GT.Socket.Pin.Four, false, null);

But don’t know why, i am not able to select GT.Interfaces in my VS (using GTI = Gadgeteer.Interfaces;)

i tried also:
GT.Socket socket = GT.Socket.GetSocket(7, true, null, null);
functname= new GT.SocketInterfaces.DigitalOutput => VS Error[em]:“Cannot creat an instance of the abstract class or interface ‘Gadgeteer.SocketInterfaces.DigitalOutput’”[/em]

Can someone pls tell me how to set in on 'HIGH’
THX!

Why not simply add a breakout our extender module and then access the pins that way? Even if you do not have these modules, just add them in the designer.

If you use latest Framework, it should be:


GT.Socket socket = GT.Socket.GetSocket(7, true, null, null);
DigitalOutput digitalOutput= DigitalOutputFactory.Create(socket, (GT.Socket.Pin) 4, false, null);