{"id":26701110,"url":"https://github.com/eagletrt/libpid-sw","last_synced_at":"2026-04-28T11:35:53.245Z","repository":{"id":284391542,"uuid":"952580855","full_name":"eagletrt/libpid-sw","owner":"eagletrt","description":"Simple implementation of a PID controller suited for all embedded devices","archived":false,"fork":false,"pushed_at":"2026-03-28T23:12:05.000Z","size":191,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-29T01:43:12.834Z","etag":null,"topics":["embedded","library","pid-controller","platformio","platformio-library","sw"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eagletrt.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-21T14:17:07.000Z","updated_at":"2025-12-14T10:46:13.000Z","dependencies_parsed_at":"2025-10-23T14:20:32.569Z","dependency_job_id":"3c7a032f-a902-4487-93a6-37154f4bfbdb","html_url":"https://github.com/eagletrt/libpid-sw","commit_stats":null,"previous_names":["eagletrt/libpid-sw"],"tags_count":1,"template":false,"template_full_name":"eagletrt/libstm32-sw-template","purl":"pkg:github/eagletrt/libpid-sw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eagletrt%2Flibpid-sw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eagletrt%2Flibpid-sw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eagletrt%2Flibpid-sw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eagletrt%2Flibpid-sw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eagletrt","download_url":"https://codeload.github.com/eagletrt/libpid-sw/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eagletrt%2Flibpid-sw/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32379617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T11:25:28.583Z","status":"ssl_error","status_checked_at":"2026-04-28T11:25:05.435Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["embedded","library","pid-controller","platformio","platformio-library","sw"],"created_at":"2025-03-27T01:18:23.788Z","updated_at":"2026-04-28T11:35:53.237Z","avatar_url":"https://github.com/eagletrt.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LIBPID-CONTROLLER\n\nThis library implements a simple PID (Proportional-Integral-Derivative) controller in C.\n\n## PID Controller\n\nA PID controller is a widely used control loop mechanism that calculates an error value as the difference between a desired setpoint and a measured process variable. It applies a correction based on proportional, integral, and derivative terms.\n\nThis type of controller is useful for maintaining stable and accurate control in various systems, such as robotics, automation, and embedded applications.\n\nThe main advantage of a PID controller is its ability to dynamically adjust its output to minimize the error over time, while its main drawback is the need for careful tuning of the `kp`, `ki`, and `kd` parameters.\n\n\u003e [!TIP]\n\u003e PID controllers are commonly used in embedded systems for precise control of motors, temperature regulation, and signal stabilization.\n\n## Dependencies\n\nThis library uses [ArenaAllocator](https://github.com/eagletrt/libarena-allocator-sw/) for memory management. Make sure to initialize the arena handler structure before using any of the PID functions.\n\n## Usage\n\nTo use this library, include the `pid-controller-api.h` header file in your program, declare a PID controller handler, and initialize it with the appropriate function before processing inputs.\n\n```c\nint main(void) {\n    struct ArenaAllocatorHandler arena;\n    arena_allocator_api_init(\u0026arena);\n\n    struct PidController pid;\n    if(pid_controller_api_init(\u0026pid, 1.0, 0.1, 0.01, 0.1, 10.0, \u0026arena, 3) != PID_OK){\n        // Error handling\n    }\n\n    while (1) {\n        float status = read_sensor_value();\n        pid_controller_api_update(\u0026pid, status);\n        float output = pid_controller_api_compute(\u0026pid);\n        apply_output(output);\n    }\n\n    arena_allocator_api_free(\u0026arena);\n    return 0;\n}\n```\n\n\u003e [!IMPORTANT]\n\u003e Remember to free the arena memory at the end of the program, even if it never ends.\n\nFor more information, check the [examples](examples) folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feagletrt%2Flibpid-sw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feagletrt%2Flibpid-sw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feagletrt%2Flibpid-sw/lists"}