#include .h
todo todo(10);
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
.h
void first(void);
class todo {
public:
todo (uint8_t pin);
static void second();
void third(); //could be bool or int as well with some parameter or only an flying step to go ahead
}
.cpp
todo::todo(uint8_t){
attachInterrupt(pin, first, CHANGE);
}
void first(void) {
todo::second();
}
void todo::second() {
question how to call the non static function, calling from second not needed but there is I stuck
}
You're asking how to have an interrupt call a class method but you don't know how to implement a class method? If you don't know how to write a class, I suggest you sort that out before you start combining them with interrupts.