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

Ports on Netduino


  • Please log in to reply
1 reply to this topic

#1 Samson

Samson

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationIndianapolis

Posted 06 October 2013 - 11:11 PM

OK I'm a convert! After years on the Arduino, VB.Net on a micro ... I'm sold! I just received my first Netduino Plus 2 and have been impressed but have encountered a three problems that I assume are a result of a bad board. Problem 1: I had to flash my firmware 6+ times this weekend when the .Net debugger could not connect to the board. I am assuming it's related to problems 2 & 3. Problem 2. The following results in the Debug statement running. This only happens on Pin 7. All others work as expected. Dim Port = New OutputPort(Pin.GPIO_Pin7, False) Port.Write(True) If Not Port.Read Then Debug.Print("Error: Station " & Number.ToString & " should be on but Pin(" & Port.Id.ToString & ") is not high") Endif Problem 3. The 4th statement below "Dim A4 ..." results in a "A first chance exception of type 'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.dll" error. This only happens with Pin 4. Dim A1 As OutputPort = New OutputPort(Pin.GPIO_Pin1, False) Dim A2 As OutputPort = New OutputPort(Pin.GPIO_Pin2, False) Dim A3 As OutputPort = New OutputPort(Pin.GPIO_Pin3, False) Dim A4 As OutputPort = New OutputPort(Pin.GPIO_Pin4, False) Dim A5 As OutputPort = New OutputPort(Pin.GPIO_Pin5, False) Any help would be appreciated!

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 October 2013 - 07:27 PM

Hi Samson, Pin.GPIO_Pin# refers to the physical pins on the microcontroller rather than the digital/analog pins on the blue headers. Try using Pins.GPIO_PIN_## instead. Yes, it's a small difference in spelling--but a huge technical difference that will get you the pins you're looking for. Using the MCU pins directly can lead to unintended behavior (like locking out the debugger). Welcome to the Netduino community, Chris




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.