void task1(void *pt){
pinMode(23, OUTPUT);
while(1){
//digitalWrite(23,!digitalRead(23));
digitalWrite(23,HIGH);
delay(200);
digitalWrite(23,LOW);
delay(200);
}
}
void task2(void *pt){
pinMode(21, OUTPUT);
while(1){
//digitalWrite(21,!digitalRead(21));
digitalWrite(21,HIGH);
delay(1000);
digitalWrite(21,LOW);
delay(1000);
}
}
void setup() {
// put your setup code here, to run once:
xTaskCreatePinnedToCore(task1, "LED1", 1024, NULL, 1, NULL, 1);
xTaskCreatePinnedToCore(task2, "LED2", 1024, NULL, 2, NULL, 1);
}
void loop() {
// put your main code here, to run repeatedly:
// this speeds up the simulation
}