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!
Ports on Netduino
1 reply to this topic
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