{"id":18855842,"url":"https://github.com/flobernd/raspi-fanshim","last_synced_at":"2025-10-29T13:19:43.877Z","repository":{"id":48724895,"uuid":"200482888","full_name":"flobernd/raspi-fanshim","owner":"flobernd","description":"Lightweight library to control the pimoroni Fan SHIM device on a Raspberry Pi","archived":false,"fork":false,"pushed_at":"2019-10-02T13:23:53.000Z","size":12,"stargazers_count":13,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T11:05:56.328Z","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/flobernd.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}},"created_at":"2019-08-04T11:12:29.000Z","updated_at":"2024-06-16T05:24:09.000Z","dependencies_parsed_at":"2022-09-02T17:31:56.561Z","dependency_job_id":null,"html_url":"https://github.com/flobernd/raspi-fanshim","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/flobernd%2Fraspi-fanshim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flobernd%2Fraspi-fanshim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flobernd%2Fraspi-fanshim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flobernd%2Fraspi-fanshim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flobernd","download_url":"https://codeload.github.com/flobernd/raspi-fanshim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248868768,"owners_count":21174757,"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-11-08T03:56:32.090Z","updated_at":"2025-10-29T13:19:38.854Z","avatar_url":"https://github.com/flobernd.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raspberry Pi Fan SHIM library\n\nProvides functions to control the pimoroni `Fan SHIM` device on a Raspberry Pi.\n\n## Features\n\n### Fan control\n\nBasic functions to enable/disable the fan or query its state.\n\n```c\n/**\n * @brief   Queries the current status of the fan.\n * \n * @return  `True`, if the fan is currently running or `false`, if not.\n */\nbool RaspiFanshimIsFanEnabled(void);\n\n/**\n * @brief   Enables or disables the fan.\n * \n * @param   enabled Pass `true` to enable the fan, `false` to disable it.\n */\nvoid RaspiFanshimEnableFan(bool enabled);\n\n/**\n * @brief   Toggles the fan.\n */\nvoid RaspiFanshimToggleFan(void);\n```\n\n### LED control\n\nAllows setting the color and brightness value of the integrated `APA102` LED.\n\n```c\n/**\n * @brief   Updates the color of the `Fan SHIM`s integrated `APA102` LED.\n * \n * @param   r           The red color component.\n * @param   g           The green color component.\n * @param   b           The blue color component.\n * @param   brightness  The LED brightness (0..31).\n */\nvoid RaspiFanshimUpdateLED(uint8_t r, uint8_t g, uint8_t b, uint8_t brightness);\n```\n\n## Build\n\nInstall the required `wiringPi` library.\n\n```bash\nsudo apt install wiringpi\n```\n\nYou can use CMake to generate project files for your favorite C99 compiler.\n\n```bash\ngit clone --recursive 'https://github.com/flobernd/raspi-fanshim.git'\ncd raspi-fanshim\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake\n```\n\n## Service\n\nThe `RaspiFanshim` projects contains an [example service](./examples/FanshimService.c) that can be used as a replacement for the original python based Fan SHIM system service. It uses less CPU resources and provides more configuration options (in the source file).\n\nThis project is work in progress.\n\n## License\n\nRaspiFanshim is licensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflobernd%2Fraspi-fanshim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflobernd%2Fraspi-fanshim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflobernd%2Fraspi-fanshim/lists"}