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.

p5315's Content

There have been 2 items by p5315 (Search limited from 29-March 23)


By content type

See this member's

Sort by                Order  

#54780 More then 5 InterruptPort s

Posted by p5315 on 19 December 2013 - 03:31 PM in Netduino Plus 2 (and Netduino Plus 1)

So the pins A0-A5 dont have interrupt? Or only some of them?




#54769 More then 5 InterruptPort s

Posted by p5315 on 19 December 2013 - 02:59 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi!

Im new tor the netduino comunity but i would like to know if there are only 5 InterruptPort available on the

netduino plus 2?

i have made a test program for the InterruptPorts since i need 6 of them.

using System;using System.Net;using System.Net.Sockets;using System.Threading;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.Netduino;using Toolbox.NETMF.Hardware;namespace testinterupt.cs{    public class Program    {        static InterruptPort[] btn = new InterruptPort[6];        public static void Main()        {            btn[0] = new InterruptPort(Pins.GPIO_PIN_D4, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeLow);            btn[0].OnInterrupt += ljud_OnInterrupt;            btn[1] = new InterruptPort(Pins.GPIO_PIN_D2, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeLow);            btn[1].OnInterrupt += cinemaMode_OnInterrupt;            btn[2] = new InterruptPort(Pins.GPIO_PIN_A0, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeLow);            btn[2].OnInterrupt += projector_OnInterrupt;            btn[3] = new InterruptPort(Pins.GPIO_PIN_D7, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeLow);            btn[3].OnInterrupt += knobPuch_OnInterrupt;            btn[4] = new InterruptPort(Pins.GPIO_PIN_A2, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeLow);            btn[4].OnInterrupt += knobPuch_OnInterrupt;            btn[5] = new InterruptPort(Pins.GPIO_PIN_A1, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeLow);            btn[5].OnInterrupt += projector_OnInterrupt;            while (true)            {                Thread.Sleep(1000);                Debug.Print("main is alive");            }        }        public static void Knob_Rotated(uint Unused, uint value, DateTime Time)        {            Thread.Sleep(100);        }        public static void ljud_OnInterrupt(uint Unused, uint value, DateTime Time)        {            Thread.Sleep(100);        }        public static void cinemaMode_OnInterrupt(uint Unused, uint value, DateTime Time)        {            Thread.Sleep(100);        }        public static void projector_OnInterrupt(uint Unused, uint value, DateTime Time)        {            Thread.Sleep(100);        }        public static void knobPuch_OnInterrupt(uint d, uint e, DateTime r)        {        }    }}

Thanks Simon





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.