{"id":23085260,"url":"https://github.com/saeed-dev2/esp32_pwm_led_control","last_synced_at":"2026-01-24T02:04:09.708Z","repository":{"id":253817584,"uuid":"841016654","full_name":"Saeed-dev2/ESP32_PWM_LED_Control","owner":"Saeed-dev2","description":"\"Control an LED using PWM with the ESP32 and ESP-IDF. The LED alternates between 75% on and 25% off every 5 seconds. This project demonstrates PWM configuration and usage with the LEDC driver in ESP-IDF\"","archived":false,"fork":false,"pushed_at":"2024-08-22T17:47:46.000Z","size":16,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T16:50:00.976Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Saeed-dev2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-08-11T11:51:31.000Z","updated_at":"2024-12-04T03:21:05.000Z","dependencies_parsed_at":"2024-08-22T19:32:42.912Z","dependency_job_id":null,"html_url":"https://github.com/Saeed-dev2/ESP32_PWM_LED_Control","commit_stats":null,"previous_names":["saeed-dev2/esp32_pwm_led_control"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Saeed-dev2/ESP32_PWM_LED_Control","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saeed-dev2%2FESP32_PWM_LED_Control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saeed-dev2%2FESP32_PWM_LED_Control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saeed-dev2%2FESP32_PWM_LED_Control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saeed-dev2%2FESP32_PWM_LED_Control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Saeed-dev2","download_url":"https://codeload.github.com/Saeed-dev2/ESP32_PWM_LED_Control/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saeed-dev2%2FESP32_PWM_LED_Control/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28707363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T23:51:44.727Z","status":"online","status_checked_at":"2026-01-24T02:00:06.909Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-16T17:51:43.891Z","updated_at":"2026-01-24T02:04:09.690Z","avatar_url":"https://github.com/Saeed-dev2.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP32 PWM LED Control\n\n## Project Overview\n\nThis project showcases how to control an LED using Pulse Width Modulation (PWM) with the ESP32 microcontroller and ESP-IDF framework. The LED is programmed to be on for 75% of the time and off for 25% of the time, repeating this cycle every 5 seconds.\n\n## Features\n\n- Configures PWM for precise LED control.\n- Duty cycle set to 75% on and 25% off.\n- Complete on-off cycle duration of 5 second.\n\n## Components\n\n- **ESP32 Development Board**\n- **LED**\n- **Current-Limiting Resistor** (220Ω to 1kΩ)\n\n## Prerequisites\n\n1. **ESP-IDF:** Ensure you have ESP-IDF v4.4.4 or later installed. Follow the [ESP-IDF Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/) for installation instructions.\n\n## Hardware Connections\n\n### **Connecting the LED to ESP32**\n\n1. **ESP32 GPIO to LED:**\n   - **LED Anode (Longer Leg)**: Connect to GPIO 18 on the ESP32.\n   - **LED Cathode (Shorter Leg)**: Connect to one end of the current-limiting resistor.\n\n2. **Current-Limiting Resistor to Ground:**\n   - Connect the other end of the current-limiting resistor to the GND pin on the ESP32.\n\n\n\n**Note:**\n- **GPIO 18**: Used for PWM output.\n- **Current-Limiting Resistor**: Protects the LED by limiting current.\n- **GND**: Common ground to complete the circuit.\n\nEnsure to use a current-limiting resistor between 220Ω and 1kΩ to prevent damage to the LED and ensure correct operation.\n\n## Installation and Setup\n\n1. **Clone the Repository:**\n\n   ```sh\n   git clone https://github.com/Saeed-dev2/ESP32_PWM_LED_Control.git\n    ```\n2. **Install Dependencies:**\n\n    Install the required libraries and components:\n    ```\n    idf.py install\n    ```\n3. **Configure the Project:**\n\n    Configure project settings with:\n    ```\n    idf.py menuconfig\n    ```\n 4. **Build the Project:**\n\n    Compile the project using:\n    ```\n    idf.py build\n    ```\n5. **Flash the Firmware:**\n\n    Upload the firmware to your ESP32 board:\n    ```\n    idf.py flash\n    ```\n6. **Monitor Serial Output:**\n\n    Observe the serial output:\n    ```\n    idf.py monitor\n    ```\n    Exit the monitor by pressing `Ctrl+]`.\n\n## Author:\n`M.Saeed`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaeed-dev2%2Fesp32_pwm_led_control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaeed-dev2%2Fesp32_pwm_led_control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaeed-dev2%2Fesp32_pwm_led_control/lists"}