Hi, I’ve been reading the threads about IO60P16 module, but still do not understand how to change the following code, to use the module mentioned.
This is the actual code.
private InterruptPort reader11;
GT.Socket socket = GT.Socket.GetSocket(9, true, null, null);
var pin1 = socket.ReservePin(Gadgeteer.Socket.Pin.Three, null);
reader11 = new InterruptPort(pin1, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeBoth);
// Asign the Interrup Event
reader11.OnInterrupt += new NativeEventHandler(reader11_OnInterrupt);
// This is the Interrupt Event code
void reader11_OnInterrupt(uint data1, uint data2, DateTime time)
{
if (data2 == 0)
{
reader1count++;
reader1card = reader1card << 1;
}
reader1_Initialize();
}
I need to change this code, to use a one port and pin in the IO6016P module, the reason for change is that I need to raise the number of pins,
which can receive readings when this will be generated by the sensors.
Thanks in advanced.
lerg98