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
Netduino Plus Digial I/O
Started by caEstrada, Oct 29 2012 05:32 PM
4 replies to this topic
#1
Posted 29 October 2012 - 05:32 PM
#2
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
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#3
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
Posted 29 October 2012 - 08:07 PM
Thanks Stefan!!
#5
Posted 29 October 2012 - 08:07 PM
Thanks CW2
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users