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

can i set digital port as input


Best Answer NooM, 05 September 2013 - 05:18 PM

now take a breath and read your error.

 

'Microsoft.SPOT.Hardware.InputPort' does not contain a constructor that takes 2 arguments

 

 InputPort Inport1 = new InputPort(Pins.GPIO_PIN_D13, false);

has 2 arguments, and the error saiys it doesent want 2.

 

it wants 3.

 

public InputPort(Cpu.Pin portId, bool glitchFilter, Port.ResistorMode resistor);  

Go to the full post


  • Please log in to reply
3 replies to this topic

#1 theerawit

theerawit

    New Member

  • Members
  • Pip
  • 4 posts

Posted 05 September 2013 - 04:40 PM

can i set D0-D13 as input port

 

 InputPort Inport1 = new InputPort(Pins.GPIO_PIN_D13, false);

 

i used this code

 

and have error 'Microsoft.SPOT.Hardware.InputPort' does not contain a constructor that takes 2 arguments

 

i added 'Microsoft.SPOT.Hardware' reference already

thank you for every reply



#2 theerawit

theerawit

    New Member

  • Members
  • Pip
  • 4 posts

Posted 05 September 2013 - 04:40 PM

as digital input port



#3 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 05 September 2013 - 05:18 PM   Best Answer

now take a breath and read your error.

 

'Microsoft.SPOT.Hardware.InputPort' does not contain a constructor that takes 2 arguments

 

 InputPort Inport1 = new InputPort(Pins.GPIO_PIN_D13, false);

has 2 arguments, and the error saiys it doesent want 2.

 

it wants 3.

 

public InputPort(Cpu.Pin portId, bool glitchFilter, Port.ResistorMode resistor);  



#4 theerawit

theerawit

    New Member

  • Members
  • Pip
  • 4 posts

Posted 06 September 2013 - 06:48 AM

omg! thanks to you so much. now its work i cant find any sample about digital input.




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.