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

Netduino Plus Digial I/O


  • Please log in to reply
4 replies to this topic

#1 caEstrada

caEstrada

    Advanced Member

  • Members
  • PipPipPip
  • 84 posts

Posted 29 October 2012 - 05:32 PM

Hello, Is any chance to use D0,D1,D2 and D3 like normal Digital I/O instead UART? Same way, D4, D5...etc? Sometimes, we only need the GPIO but having the beauty of Ethernet.. Suggestions? Regards, Carlos A. Estrada

#2 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 29 October 2012 - 06:02 PM

Yes, actually all pins, D0 to D13 and A0 to A5 can be used as digital I/O pin.
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#3 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 29 October 2012 - 06:09 PM

You should be able to do that by simply creating an instance of OutputPort, InputPort or TristatePort for digital output, input or input/output respectively. The limitation is that you cannot use the alternative port functions (such as UART, SPI, PWM etc.) at the same time, you'd need to destroy the object first (via calling its Dispose() method).

var d0 = new OutputPort(Pins.GPIO_PIN_D0, true); // Digital output, initially logic high
d0.Write(false);
d0.Write(true);


#4 caEstrada

caEstrada

    Advanced Member

  • Members
  • PipPipPip
  • 84 posts

Posted 29 October 2012 - 08:07 PM

Thanks Stefan!!

#5 caEstrada

caEstrada

    Advanced Member

  • Members
  • PipPipPip
  • 84 posts

Posted 29 October 2012 - 08:07 PM

Thanks CW2




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.