Passing class-member function to another class

Hi,
In a purely OO environment, the approach suggested above would work very nicely however while many Arduino libraries implement classes, they tend to be implemented to work with C rather than a pure 00 approach. The Alarm class expects a C function and will not work with interfaces however if you really want to use an OO approach, you could rewrite the Alarm library to work with interfaces, the previous poster has provided a good template.

Then again, how much new code and reinventing of existing code do you really want to do to toggle a pin ?

Duane B

rcarduino.blogspot.com