{"id":17458541,"url":"https://github.com/rambros3d/unified_pin_control","last_synced_at":"2026-04-16T19:36:18.301Z","repository":{"id":255806510,"uuid":"853652869","full_name":"rambros3d/unified_pin_control","owner":"rambros3d","description":"Arduino code for pin control using serial commands with support for digital, analog, and PWM operations","archived":false,"fork":false,"pushed_at":"2024-09-07T08:11:30.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T04:33:24.437Z","etag":null,"topics":["analogwrite","arduino","arduino-sketch","digitalwrite","esp32","esp32-s3","pwm","rp2040"],"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/rambros3d.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":"2024-09-07T06:27:39.000Z","updated_at":"2024-09-07T08:11:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"052fee52-9bc0-4169-b0e0-aff913641875","html_url":"https://github.com/rambros3d/unified_pin_control","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"3e023a4363e5ec4c57ab13439badfec99807545e"},"previous_names":["rambrosteam/unified_pin_control"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rambros3d%2Funified_pin_control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rambros3d%2Funified_pin_control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rambros3d%2Funified_pin_control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rambros3d%2Funified_pin_control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rambros3d","download_url":"https://codeload.github.com/rambros3d/unified_pin_control/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245978206,"owners_count":20703676,"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":["analogwrite","arduino","arduino-sketch","digitalwrite","esp32","esp32-s3","pwm","rp2040"],"created_at":"2024-10-18T04:05:51.230Z","updated_at":"2025-10-24T05:43:32.558Z","avatar_url":"https://github.com/rambros3d.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unified Pin Control\n\n## Description\n\nThe **Unified Pin Control** system is an Arduino sketch designed to simplify GPIO pin control through serial communication. This system supports configuring and controlling GPIO pins with various commands. You can set pin modes, write values, read inputs, and deactivate pins, all while receiving real-time updates.\n\n## Features\n\n- Configure pin modes: `INPUT`, `OUTPUT`, `INPUT_PULLDOWN`\n- Write digital values: `HIGH`, `LOW`\n- Write PWM values with automatic range constraints\n- Read digital and analog values\n- Deactivate pins and reset all pin configurations\n- Real-time status updates at predefined intervals\n\n## Commands\n\n### INPUT - digitalRead\n\n**Description**: Configures the selected pin as an input pin for digital reads.\n\n**Usage**:\n\n```\nGPIO(pin number) INPUT\n```\n\n**Example**:\n\n```\nGPIO4 INPUT\n```\n\n**Expected Output**:\n\n```\nPIN     MODE    TYPE    VALUE\nGPIO4  INPUT   DIGITAL LOW\n```\n\n### GPIO(pin number) INPUT_PULLDOWN\n\n**Description**: Configures the selected pin as an input pin with an internal pull-down resistor.\n\n**Usage**:\n\n```\nGPIO(pin number) INPUT_PULLDOWN\n```\n\n**Example**:\n\n```\nGPIO2 INPUT_PULLDOWN\n```\n\n**Expected Output**:\n\n```\nPIN     MODE    TYPE    VALUE\nGPIO2  INPUT   LOGIC   LOW\n```\n\n### ANALOG - analogRead\n\n**Description**: Configures the selected pin as an input pin for analog reads.\n\n**Usage**:\n\n```\nGPIO(pin number) ANALOG\n```\n\n**Example**:\n\n```\nGPIO12 ANALOG\n```\n\n**Expected Output**:\n\n```\nPIN     MODE    TYPE    VALUE\nGPIO12  INPUT   ANALOG  512\n```\n\n### HIGH - digitalWrite\n\n**Description**: Configures the selected pin as an output and sets it to HIGH.\n\n**Usage**:\n\n```\nGPIO(pin number) HIGH\n```\n\n**Example**:\n\n```\nGPIO14 HIGH\n```\n\n**Expected Output**:\n\n```\nPIN     MODE    TYPE    VALUE\nGPIO14  OUTPUT  DIGITAL HIGH\n```\n\n### LOW - digitalWrite\n\n**Description**: Configures the selected pin as an output and sets it to LOW.\n\n**Usage**:\n\n```\nGPIO(pin number) LOW\n```\n\n**Example**:\n\n```\nGPIO15 LOW\n```\n\n**Expected Output**:\n\n```\nPIN     MODE    TYPE    VALUE\nGPIO15  OUTPUT  DIGITAL LOW\n```\n\n### PWM - analogWrite\n\n**Description**: Configures the selected pin as an output and sets its PWM value. The value must be within the range of 0 to 255 (default 8-bit resolution).\n\n**Usage**:\n\n```\nGPIO(pin number) (integer)\n```\n\n**Example**:\n\n```\nGPIO12 128\n```\n\n**Expected Output**:\n\n```\nPIN     MODE    TYPE    VALUE\nGPIO12  OUTPUT  PWM     128\n```\n\n### REMOVE\n\n**Description**: Deactivates the selected pin.\n\n**Usage**:\n\n```\nGPIO(pin number) REMOVE\n```\n\n### **Example**:\n\n```\nGPIO22 REMOVE\n```\n\n### REMOVE ALL\n\n**Description**: Deactivates all configured pins.\n\n**Usage**:\n\n```C++\nREMOVE ALL\n```\n\n### HELP - print available commands\n\n**Description**: Displays the help message with a summary of available commands.\n\n**Usage**:\n\n```\nh\nH\nHELP\n```\n\n**Example**:\n\n```\nHELP\n```\n\n**Expected Output**:\n\n```\nUnified Pin Control\nAvailable commands:\n1. GPIO(pin) INPUT for digitalRead\n2. GPIO(pin) ANALOG for analogRead\n3. GPIO(pin) INPUT_PULLDOWN for digitalRead with pull-down resistor\n4. GPIO(pin) HIGH or LOW for digitalWrite\n5. GPIO(pin) (integer) for analogWrite\n6. GPIO(pin) REMOVE to deactivate pin\n7. REMOVE ALL to deactivate all pins\n8. h, H, or HELP for command help\n```\n\n## Pin Status\n\nThe system displays the status of each pin, including:\n\n- **PIN**: The GPIO pin number.\n- **MODE**: The pin's mode (e.g., INPUT, OUTPUT).\n- **TYPE**: The type of value read or written (e.g., DIGITAL, ANALOG, PWM).\n- **VALUE**: The current value of the pin.\n\n---\n\n## Installation\n\n1. Upload the sketch to your Arduino board using the Arduino IDE.\n2. Open the Serial Monitor at a baud rate of 115200.\n3. Enter commands as described above to configure and manage the GPIO pins.\n\n---\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frambros3d%2Funified_pin_control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frambros3d%2Funified_pin_control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frambros3d%2Funified_pin_control/lists"}