Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void task1(void * parameter) {
- for(;;) {
- // Task 1 code
- vTaskDelay(1000 / portTICK_PERIOD_MS);
- }
- }
- void task2(void * parameter) {
- for(;;) {
- // Task 2 code
- vTaskDelay(500 / portTICK_PERIOD_MS);
- }
- }
- void setup() {
- xTaskCreate(task1, "Task 1", 1000, NULL, 1, NULL);
- xTaskCreate(task2, "Task 2", 1000, NULL, 1, NULL);
- }
- void loop() {
- // No code needed here
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement