Skip to content

Instantly share code, notes, and snippets.

@maxpromer
Created June 6, 2017 17:21
Show Gist options
  • Save maxpromer/8fc7999ff24ad78e135fdc7848f82c2b to your computer and use it in GitHub Desktop.
Save maxpromer/8fc7999ff24ad78e135fdc7848f82c2b to your computer and use it in GitHub Desktop.
#define LED1 LED_BUILTIN
#define LED2 23
void LEDTwo_Task(void *p){
pinMode(LED2, OUTPUT);
while(1) {
digitalWrite(LED2, !digitalRead(LED2));
delay(300);
}
}
void setup() {
xTaskCreate(&LEDTwo_Task, "LEDTwo_Task", 2048, NULL, 10, NULL);
pinMode(LED1, OUTPUT);
}
void loop() {
digitalWrite(LED1, !digitalRead(LED1));
delay(500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment