{"id":22869038,"url":"https://github.com/jbilander/esp32-multitask-blink-example","last_synced_at":"2025-03-31T11:14:07.027Z","repository":{"id":137347225,"uuid":"592277971","full_name":"jbilander/esp32-multitask-blink-example","owner":"jbilander","description":"FreeRTOS blink two LEDs example for the ESP32, FreeRTOS allows us to handle several tasks in parallel that run independently.","archived":false,"fork":false,"pushed_at":"2023-01-23T16:07:57.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T16:05:36.388Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jbilander.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-23T11:35:36.000Z","updated_at":"2023-01-23T16:03:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"c586d5e4-99c2-474f-93c8-f0f63ba9ddef","html_url":"https://github.com/jbilander/esp32-multitask-blink-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbilander%2Fesp32-multitask-blink-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbilander%2Fesp32-multitask-blink-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbilander%2Fesp32-multitask-blink-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbilander%2Fesp32-multitask-blink-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jbilander","download_url":"https://codeload.github.com/jbilander/esp32-multitask-blink-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246458009,"owners_count":20780678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-13T12:45:00.401Z","updated_at":"2025-03-31T11:14:07.021Z","avatar_url":"https://github.com/jbilander.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esp32-multitask-blink-example\nFreeRTOS blink two LEDs example for the ESP32, FreeRTOS allows us to handle several tasks in parallel that run independently.\u003cbr /\u003e\n\u003cbr /\u003e\nExample is taken from here:\u003cbr /\u003e\nhttps://randomnerdtutorials.com/esp32-dual-core-arduino-ide/\n\u003cbr /\u003e\n\u003cbr /\u003e\nWhy is this useful? \u003cbr /\u003e\nIn real life, instead of blinking LEDs, this can be tasks like making a network request, measuring sensors, controlling a motor, etc…\u003cbr /\u003e\nIt will then be useful to assign specific parts of the code to a specific core in order to optimize performance.\n\n***\n\n\u003ca href=\"https://user-images.githubusercontent.com/1673918/214081208-1367c18b-2388-4d43-b41c-8212f15f3aa6.jpg\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/1673918/214081208-1367c18b-2388-4d43-b41c-8212f15f3aa6.jpg\" width=\"512\" height=\"384\"\u003e\n\u003c/a\u003e\n\n***\n\nDemo video here:\u003cbr /\u003e\nhttps://drive.google.com/file/d/1HbspRSdvF7cROVlgxRoYOVJftApYekXf/view?usp=sharing\n\n***\n\n### Prerequisites\n\n* Download and install Visual Studio Code\n* Download and install `arduino-cli` (pre-built binary)\u003cbr /\u003e \n  https://arduino.github.io/arduino-cli/0.21/installation/#latest-release\n* Set the PATH to the folder where `arduino-cli` is located (`arduino-cli.exe` on Windows).\n* Install/Activate the Extension: Arduino for Visual Studio Code.\n* CP2102 USB to UART bridge chip drivers installed (or whatever chip your ESP32 module has for this)\u003cbr /\u003e\n  https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads\n  \u003cbr /\u003e\n  \u003cbr /\u003e\n  ![CP2102_USB_to_UART_Bridge](https://user-images.githubusercontent.com/1673918/214069209-56d945dc-1b37-4c78-b382-b7765a6d2505.jpg)\n\n\n***\n\n![VSCode_screenshot_pic3](https://user-images.githubusercontent.com/1673918/214077845-6be800e5-e5d7-4c59-bd0b-4736d077ea9f.jpg)\n\n***\n\n### Installation (on Windows)\n\n    C:\\\u003earduino-cli config init\n        Config file written to: C:\\Users\\Jorgen\\AppData\\Local\\Arduino15\\arduino-cli.yaml\n    \n    C:\\\u003earduino-cli config add board_manager.additional_urls https://dl.espressif.com/dl/package_esp32_index.json\n    \n    C:\\\u003earduino-cli config dump\n        board_manager:\n          additional_urls:\n          - https://dl.espressif.com/dl/package_esp32_index.json\n    \n    C:\\\u003earduino-cli board listall\n        Downloading missing tool builtin:ctags@5.8-arduino11...\n        builtin:ctags@5.8-arduino11 downloaded\n        Installing builtin:ctags@5.8-arduino11...\n        builtin:ctags@5.8-arduino11 installed\n        Downloading missing tool builtin:serial-discovery@1.3.3...\n        builtin:serial-discovery@1.3.3 downloaded\n        Installing builtin:serial-discovery@1.3.3...\n        builtin:serial-discovery@1.3.3 installed\n        Downloading missing tool builtin:mdns-discovery@1.0.6...\n        builtin:mdns-discovery@1.0.6 downloaded\n        Installing builtin:mdns-discovery@1.0.6...\n        builtin:mdns-discovery@1.0.6 installed\n        Downloading missing tool builtin:serial-monitor@0.12.0...\n        builtin:serial-monitor@0.12.0 downloaded\n        Installing builtin:serial-monitor@0.12.0...\n        builtin:serial-monitor@0.12.0 installed\n        Board Name FQBN\n        \n    C:\\\u003earduino-cli core install esp32:esp32\n        Downloading packages...\n        esp32:xtensa-esp32-elf-gcc@1.22.0-97-gc752ad5-5.2.0 downloaded\n        esp32:esptool_py@3.0.0 downloaded\n        esp32:mkspiffs@0.2.3 downloaded\n        esp32:esp32@1.0.6 downloaded\n        Installing esp32:xtensa-esp32-elf-gcc@1.22.0-97-gc752ad5-5.2.0...\n        esp32:xtensa-esp32-elf-gcc@1.22.0-97-gc752ad5-5.2.0 installed\n        Installing esp32:esptool_py@3.0.0...\n        esp32:esptool_py@3.0.0 installed\n        Installing esp32:mkspiffs@0.2.3...\n        esp32:mkspiffs@0.2.3 installed\n        Installing platform esp32:esp32@1.0.6...\n        Configuring platform....\n        Platform esp32:esp32@1.0.6 installed\n    \n    Please note, this last step below is not needed if you clone this repository\n    \n    C:\\Users\\Jorgen\\Projects\u003earduino-cli sketch new esp32-multitask-blink-example\n        Sketch created in: C:\\Users\\Jorgen\\Projects\\esp32-multitask-blink-example\n        \n***\n### VSCode configuration:\nChange path where needed, these files are located under the `.vscode`-folder in this repository but I show the content here for clarity, you don't have to copy-paste if you clone or download them from this repository, just change to your board, your COM-port and your PATH.\n\n`settings.json`\n    \n    {\n        \"arduino.enableUSBDetection\": true,\n        \"arduino.logLevel\": \"verbose\",\n        \"arduino.path\": \"C:/Bin\",\n        \"arduino.commandPath\": \"arduino-cli.exe\",\n        \"arduino.useArduinoCli\": true,\n        \"arduino.disableIntelliSenseAutoGen\": true,\n        \"arduino.defaultBaudRate\": 115200\n    }\n    \n***    \n    \n`arduino.json`\n\n    {\n        \"configuration\": \"FlashFreq=40,UploadSpeed=115200,DebugLevel=none\",\n        \"board\": \"esp32:esp32:esp32doit-devkit-v1\",\n        \"sketch\": \"esp32-multitask-blink-example.ino\",\n        \"port\": \"COM4\",\n        \"output\": \"build\"\n    }\n\n***\n\n`c_cpp_properties.json`\n    \n    {\n        \"configurations\": [\n            {\n                \"name\": \"ESP32\",\n                \"includePath\": [\n                    \"${workspaceFolder}/**\",\n                    \"C:/Users/Jorgen/AppData/Local/Arduino15/packages/esp32/hardware/esp32/1.0.6/**\"\n                ],\n                \"defines\": [\n                    \"_DEBUG\",\n                    \"UNICODE\",\n                    \"_UNICODE\"\n                ],\n                \"compilerPath\": \"C:/Users/Jorgen/AppData/Local/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-g++\",\n                \"cStandard\": \"c11\",\n                \"cppStandard\": \"gnu++11\",\n                \"intelliSenseMode\": \"gcc-x86\"\n            }\n        ],\n        \"version\": 4\n    }\n    \n***\n\n\u003cbr /\u003e\n\nIf you got everything configured right you should be able to `CTRL`-click on `Arduino.h` and VSCode will take you there:\n\n\u003cbr /\u003e\n\n![VSCode_screenshot_pic2](https://user-images.githubusercontent.com/1673918/214077814-a9b102e9-f8b4-4e04-80e1-0f4865920751.jpg)\n\n***\n\n![VSCode_screenshot_pic1](https://user-images.githubusercontent.com/1673918/214077575-0687077c-f12d-47dc-9f40-a6748afeb2e9.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbilander%2Fesp32-multitask-blink-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbilander%2Fesp32-multitask-blink-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbilander%2Fesp32-multitask-blink-example/lists"}