MCPcopy Create free account
hub / github.com/SmingHub/Sming / begin

Method begin

samples/Basic_Servo/app/application.cpp:23–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21{
22public:
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
31protected:
32 void calcValue();

Callers 1

initFunction · 0.45

Calls 1

startMethod · 0.45

Tested by

no test coverage detected