#include "FreeRTOS.h"
#include "task.h"
// Task function
void simpleTask(void *pvParameters) {
while (1) {
digitalWrite(8, HIGH);
delay(500);
digitalWrite(8, LOW);
delay(500);
}
}
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, STM32!");
pinMode(8, OUTPUT);
// Create a task with a priority of 1
xTaskCreate(simpleTask, "SimpleTask", configMINIMAL_STACK_SIZE, NULL, 1, NULL);
// Start the scheduler
vTaskStartScheduler();
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}