I have just bought and soldered together a relay board and connected it in between an extension lead. The netduino is connected to the relay, and for testing, when I press the button on the netduino it should output on port 13 a 3.3v that should switch the relay.
My problem is that when i press the button on the netduino, nothing happend! So i connected the wire that controls the relay to the 3.3v output on the netduino and it switched. So that made me think the problem must be that there is no voltage coming from port 13.
I tested the output using a multimeter, and sure enough there is no voltage from port 13 when pressing the button. I've tried 4 different GPIO ports.
Have I broken my netduino, so it no longer outputs voltage out the GPIO ports??
The simple code is below:
(by the way, the onboard LED turns on with button press, so i know the code is running.
InputPort btn = new InputPort(Pins.ONBOARD_BTN, false, Port.ResistorMode.Disabled); OutputPort out13 = new OutputPort(Cpu.Pin.GPIO_Pin13, false); OutputPort outLED = new OutputPort(Pins.ONBOARD_LED, false); bool buttonState = false; while (true) { buttonState = btn.Read(); out13.Write(buttonState); outLED.Write(buttonState); }