GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - eduautomatiza/esp32-taskNotify: Example of taskNotify() using freeRTOS for ESP32 and running two tasks.

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
.vscode
.vscode
 
 
include
include
 
 
lib
lib
 
 
src
src
 
 
test
test
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
platformio.ini
platformio.ini
 
 

Repository files navigation

esp32-taskNotify

Example of taskNotify(), freeRTOS, for ESP32 running two tasks.

The project uses PlatformIO IDE for VSCode, Visual Studio Code and arduino framework for espressif32 platform;

first task, main.cpp:

void setup() {
  esp_task_wdt_init(60, true);  // time in seconds
  enableLoopWDT();

  Serial.begin(115200);
  delay(100);

  // put your setup code here, to run once:
  Serial.println("Setup 1");
  createTask2();
}

void loop() {
  // put your main code here, to run repeatedly:
  static uint32_t valueToSend = 0;
  uint32_t receivedValue;

  if (xTaskNotify(loop2TaskHandle, valueToSend, eSetValueWithoutOverwrite) ==
      pdTRUE) {
    valueToSend++;
    if (xTaskNotifyWait(0, ULONG_MAX, &receivedValue, 1000) == pdFAIL) {
      Serial.println("error, task2 do not response");
    }
  }
}

second task, task_2.cpp:

void setup2(void) {
  enableLoop2WDT();

  // put your setup code here, to run once:
  Serial.println("Setup 2");
}

void loop2(void) {
  // put your main code here, to run repeatedly:
  uint32_t receivedValue;

  if (xTaskNotifyWait(0, ULONG_MAX, &receivedValue, 1000) == pdPASS) {
    xTaskNotify(loopTaskHandle, receivedValue, eSetValueWithOverwrite);
  }
}

About

Example of taskNotify() using freeRTOS for ESP32 and running two tasks.

Topics

arduinocppesp32esp32-arduinoesp32-platformionodemcuplatformiovisual-studio-codevscodewroom32

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

Generated from eduautomatiza/esp32-task-example
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.