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

InterruptPort not working on designated port but on higher port


Best Answer Chris Walker, 09 March 2014 - 06:14 PM

Hi serverside6,

Cpu.Pin.GPIO_Pin6 refers to physical pin 6 on the STM32 microcontroller which is on your Netduino (pin A6).

Try changing our code to "Pins.GPIO_PIN_D6" to refer to pin D6 on the blue headers...and you should be good to go.

Welcome to the Netduino community,

Chris Go to the full post


  • Please log in to reply
1 reply to this topic

#1 serverside6

serverside6

    New Member

  • Members
  • Pip
  • 1 posts

Posted 09 March 2014 - 04:59 PM

Hi,

Netduino2

v4.3.1

 

The following code works fine if I wire into gpio port D9 but not on port D6 as I have designated in my code.  Any ideas?


using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT.Hardware;
using NetduinoDeviceLibrary;
.
.
.

private static void GoHighPlayTone() {

 

   var interruptPort = new InterruptPort(Cpu.Pin.GPIO_Pin6,

                                                             false,

                                                             Port.ResistorMode.Disabled,

                                                             Port.InterruptMode.InterruptEdgeHigh);

 

   interruptPort.OnInterrupt += GoneHighHandler; Thread.Sleep(Timeout.Infinite);

}

 



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 March 2014 - 06:14 PM   Best Answer

Hi serverside6,

Cpu.Pin.GPIO_Pin6 refers to physical pin 6 on the STM32 microcontroller which is on your Netduino (pin A6).

Try changing our code to "Pins.GPIO_PIN_D6" to refer to pin D6 on the blue headers...and you should be good to go.

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.