Using the Button driver for other interrupt types

I’m working on a project that uses a sensor (keeping the type of sensor under wraps until I’m able to demo the project) that indicates the thing it’s sensing by pulling its output pin high. Very simple interface…3 pins, GND, VCC, and signal.

It seems to me that if all I’m doing is flipping a pin from low to high, that if I connect the sensor with an extender/breakout module, and wire the pins the same as the standard button module, I should be able to connect it using the button module in the designer, and take advantage of the built in event handling.

Am I correct in this assumption? I don’t see any harm in trying, but figured it was worth throwing the question out here for posterity.

Why not follow Pete’s excellent tutorial and just knock up a quick module? The template uses the standard button (from memory). It would take about 5 mins for a simple module.

But in answer to the original question - I see no reason why it shouldn’t work.

That’s actually a great idea…though I should probably write the driver for my OTHER module first.

And yes, it works perfectly. Was just about as easy as it’s possible to be. One of the reasons I really love Gadgeteer. :slight_smile:

I happened to stumble across Pete’s tutorial just after getting my first Gadgeteer board and followed it to created a module for an Arduino 6 button breakout and it worked first time!

I was amazed at how easy it was.