I'm using an Arduino MEGA, so I've got access to the extra interrupt--but the code throws that error even when I just use the first of these functions. The handler here doesn't take any parameters, or return anything... unless I can't even return "void"?
Here's my interrupt handler, using just this line within setup():
attachInterrupt(0, erg.flyClick, RISING); //sets interrupt 0 (pin __) to monitor flywheel
Handler:
//calculates instantaneous flywheel velocity when assigned interrupt detects a click from the flywheel
void Ergometer::flyClick()
{
unsigned long currentTime = micros();
flyOmega = (2 * pi) / (microsToSecs(currentTime - flyTime) * _numMags);
flyTime = currentTime;
updateDistance(); //updates total distance every time the flywheel clicks
}
Is it a problem that I call a separate function, updateDistance? All that does is this:
//calculates ratio of time in water to time in air--1 is all time in air, 0 is all time in water
void Ergometer::updateDistance()
{
totalDistance = pow((dragFact / _cSplit), (1 / 3)) * (flyClicks / _numMags);
}
And this error results:
In function 'void setup()':
error: argument of type 'void (Ergometer:

()' does not match 'void (*)()'