Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Broken Digital IO?


  • Please log in to reply
3 replies to this topic

#1 Wayneio

Wayneio

    Member

  • Members
  • PipPip
  • 24 posts

Posted 31 July 2013 - 08:45 PM

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);		    }


#2 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 31 July 2013 - 08:48 PM

Cpu.Pin.GPIO_Pin13 is the problem. thats the reference to the hardware pins, like pin13 on the uC itself.

 

use Pins.yourpin and it will work (like you did for the onboard_led)



#3 Wayneio

Wayneio

    Member

  • Members
  • PipPip
  • 24 posts

Posted 31 July 2013 - 08:52 PM

Cpu.Pin.GPIO_Pin13 is the problem. thats the reference to the hardware pins, like pin13 on the uC itself.

 

use Pins.yourpin and it will work (like you did for the onboard_led)

 

Oh! Thank you! Such a simple thing that had me stumped for ages.

 

Where is the cpu pin 13 then?

 

Now I have this sorted, i'll put up a video of my app controlled home lights and fan soon!



#4 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 31 July 2013 - 10:08 PM

Where is the cpu pin 13 then?

 

 

check the uC's datasheet.

and than compare it with the netduino shematics.

i guess its not broken out, but youll never know.

 

(these uC's can have some 100 of pins, and the little netduino only has a few broken out)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.