I’m searching for the assemblies to include a recently bought Relay 1x (https://www.ghielectronics.com/catalog/product/464)
I Can’t find it (in the toolbox of visual studio or as a class inside an assembly)
The “developers guide” only shows a method: SetRelayState but no hints on the class, namespace, etc…
I imagine that opening a relay shoud be easy and similar to lighting a led.
From other examples, I’ve written this code, and I’m asking to more experienced users if this implementation is correct to open the relay for a 500ms, connected to a socket num. 3 in a Fez Hydra (Socket type S and Y). The schematics shows that pin 5 is the one conected to the relay.
dim socket As Gadgeteer.Socket
dim relay_control As GT.Interfaces.DigitalOutput
socket = GT.Socket.GetSocket(3, True, Nothing, "Relay")
relay_control = New Gadgeteer.Interfaces.DigitalOutput(socket, Gadgeteer.Socket.Pin.Five, False, Nothing)
relay_control.Write(True)
Thread.Sleep(500)
relay_control.Write(False)
Thanks for the interest.