Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <TimerThree.h>
- TimerThree t1;
- void setup(){
- Serial.println("Timer test @ 1 second");
- Serial.begin(9600);
- t1.initialize(2000000);
- t1.attachInterrupt(callback);
- }
- void callback(){
- printstuff();
- }
- void loop(){
- Serial.print("one second delay loop");
- delay(1000);
- }
- void printstuff(){
- Serial.print("timer interrupt triggered ");
- }
Add Comment
Please, Sign In to add comment