| 21 | { |
| 22 | public: |
| 23 | bool begin(uint8_t pin, unsigned intervalMs) |
| 24 | { |
| 25 | if(!attach(pin)) { |
| 26 | return false; // Out of channels |
| 27 | } |
| 28 | return timer.initializeMs(intervalMs, TimerDelegate(&MyServoChannel::calcValue, this)).start(); |
| 29 | } |
| 30 | |
| 31 | protected: |
| 32 | void calcValue(); |