Main Site Documentation

DigitalOutput?


#1

hi,
can someone explain to me how you use the command DigitalOutput?
Use a gadgeteer MOUNTANEER eth.
I tried to use the following code:

         GT.Interfaces.DigitalOutput out1;
         GT.Socket GT.Socket.GetSocket socket = (4, true, null, null);
         out1 = new GT.Interfaces.DigitalOutput (socket, GT.Socket.Pin.Three, true, null);
         out1.Write (true);

but it does not work, I get:

 Create TS.

    Loading start at 8054110, end 8066fcc

    Assembly: mscorlib (4.2.0.0) Assembly: Microsoft.SPOT.Native (4.2.0.0) Assembly:         Microsoft.SPOT.Hardware (4.2.0.0)
    Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1) Assembly:       Microsoft.SPOT.Hardware.SerialPort (4.2.0.0)
    Assembly: Microsoft.SPOT.Net (4.2.0.0) Assembly: System (4.2.0.0) Loading Deployment Assemblies.

     Attaching deployed file.

     Assembly: MFConsoleApplication1 (1.0.0.0) Attaching files deployed.

     Assembly: Microsoft.SPOT.IO (4.2.0.0) Attaching files deployed.

     Assembly: Microsoft.SPOT.TinyCore (4.2.0.0) Attaching files deployed.

     Assembly: Microsoft.SPOT.Graphics (4.2.0.0) Attaching files deployed.

     Assembly: Mountaineer.Netmf.Hardware (1.0.0.0) Attaching files deployed.

     Assembly: System.IO (4.2.0.0) Attaching files deployed.

     Assembly: Gadgeteer (2.42.0.0) Resolving.

     Resolve: unknown type: Microsoft.SPOT.Touch.TouchGestureEventArgs

     Error: ff000000

     The program '[4] Micro Framework application: Managed' has exited with code 0 (0x0).
     Waiting for debug commands ...

Thanks


#2

The best way would be by looking at the extender or breakout modules drivers…or even using them as is.


#3

sorry,
what does you mean for “Extender or modules drivers”?


#4

in the designer add an extender module. Then you will be able to control the pins high / low etc