Created
January 28, 2011 15:07
-
-
Save laclefyoshi/800358 to your computer and use it in GitHub Desktop.
Arduino FlexiTimer2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <FlexiTimer2.h> | |
#define LedPin1 10 | |
#define LedPin2 9 | |
void blink1() { | |
digitalWrite(LedPin1, !digitalRead(LedPin1)); | |
} | |
void blink2() { | |
digitalWrite(LedPin2, !digitalRead(LedPin2)); | |
} | |
void setup() { | |
pinMode(LedPin1, OUTPUT); | |
pinMode(LedPin2, OUTPUT); | |
FlexiTimer2::set(1000, blink1); // not work! | |
// or rather, above code is overwrited by following statement. | |
FlexiTimer2::set(2000, blink2); | |
FlexiTimer2::start(); | |
} | |
void loop() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment