PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
libArduino
tests
Interval
Interval.cpp
1
4
#include <Arduino.h>
5
#include <stdio.h>
6
#include <Interval.h>
7
8
long
value = 0;
9
10
void
intervalCallback(
void
*par)
11
{
12
long
* value = (
long
*)par;
13
(*value)++;
14
}
15
16
void
setup()
17
{
18
Serial.println(
"In setup"
);
19
Interval::attach(&intervalCallback, 1000, &value);
20
}
21
22
void
loop()
23
{
24
delay(2000);
25
Serial.print(
"In loop, value = "
);
26
Serial.println(value);
27
}
28
Generated on Fri May 20 2022 16:48:01 for PropWare by
1.8.17