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