diff --git a/libraries/Ticker/examples/TickerParameter/TickerParameter.ino b/libraries/Ticker/examples/TickerParameter/TickerParameter.ino index 99c69c62567..a6c7d9d2348 100644 --- a/libraries/Ticker/examples/TickerParameter/TickerParameter.ino +++ b/libraries/Ticker/examples/TickerParameter/TickerParameter.ino @@ -24,15 +24,19 @@ void setPin(int state) { digitalWrite(LED_BUILTIN, state); } +void setPinChar(char state) { + digitalWrite(LED_BUILTIN, state); +} + void setup() { pinMode(LED_BUILTIN, OUTPUT); - digitalWrite(1, LOW); // every 25 ms, call setPin(0) tickerSetLow.attach_ms(25, setPin, 0); - // every 26 ms, call setPin(1) - tickerSetHigh.attach_ms(26, setPin, 1); + // every 26 ms, call setPinChar(1) + tickerSetHigh.attach_ms(26, setPinChar, (char)1); + } void loop() {