Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c061548 commit 12c38f1Copy full SHA for 12c38f1
libraries/Ticker/examples/TickerParameter/TickerParameter.ino
@@ -24,15 +24,19 @@ void setPin(int state) {
24
digitalWrite(LED_BUILTIN, state);
25
}
26
27
+void setPinChar(char state) {
28
+ digitalWrite(LED_BUILTIN, state);
29
+}
30
+
31
void setup() {
32
pinMode(LED_BUILTIN, OUTPUT);
- digitalWrite(1, LOW);
33
34
// every 25 ms, call setPin(0)
35
tickerSetLow.attach_ms(25, setPin, 0);
36
- // every 26 ms, call setPin(1)
- tickerSetHigh.attach_ms(26, setPin, 1);
37
+ // every 26 ms, call setPinChar(1)
38
+ tickerSetHigh.attach_ms(26, setPinChar, (char)1);
39
40
41
42
void loop() {
0 commit comments