Main Site Documentation

Digital output on Cobra II


#1

I have problems with digital outputs in Cobra.
I try several different ways, but now I am asking what is the right path.
Where should I connect the output (maybe I confused pins) and how to initialize digital output?


#2

to use the pads on the side use


private OutputPort solenoid = new OutputPort(GHI.Hardware.G120.Pin.P1_5,false);

#3

Just like I tried. And which pin is this (http://www.ghielectronics.com/uploads/doc/item/1561_large.jpg)
I think that my Voltmeter doesn’t respond to write(true/false) call. Is this possible?


#4

What pin is what?? P1_5 is P1.5 on the silkscreen (see the back of the device)

a better check is possibly to use an LED. But a voltmeter definitely should show the 3v3 on output. I’ve just done this and it works and I can see the voltage drop to 0 then go back up to 3v3.

myport.Write(false);
Debug.Print("off");
Thread.Sleep(5000);
myport.Write(true);
Debug.Print("on");
Thread.Sleep(5000);


#5

My Cobra is mounted. But I found the right pin.
I was relying on numbers on image I provided, not the actual data written on board. My mistake.