# Class member function as callback for interrupt

**URL:** <https://forum.arduino.cc/t/class-member-function-as-callback-for-interrupt/1381694>\
**Category:** Programming\
**Created:** [May 15, 2025, 10:31am UTC](https://forum.arduino.cc/t/class-member-function-as-callback-for-interrupt/1381694 "2025-05-15T10:31:33Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![kammscherkreis](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/kammscherkreis/32/1127277_2.png) [@kammscherkreis](https://forum.arduino.cc/u/kammscherkreis)\
**Post date:** [May 15, 2025, 12:58pm UTC](https://forum.arduino.cc/t/class-member-function-as-callback-for-interrupt/1381694/5 "2025-05-15T12:58:48Z")

</div>

Ok, I get it, thanks again.

I'm planning to have several instances of the class. The first use of the class is a self-balancing motor with two motors, but I'd like to be able to eventually use it with more motors in the future (i.e. a 4WD car).

I've found [this discussion](https://forum.arduino.cc/t/interrupt-in-class-esp32/1039326/14) in which you actually also participated and looks quite promising. I'll give it a try when I'm back home, but any other suggestion is welcome.

---

_[View the full topic](https://forum.arduino.cc/t/class-member-function-as-callback-for-interrupt/1381694)._
