{"id":16387191,"url":"https://github.com/zackshen/rpi-iot-fan","last_synced_at":"2026-06-17T12:31:54.796Z","repository":{"id":68450906,"uuid":"61478307","full_name":"zackshen/rpi-iot-fan","owner":"zackshen","description":null,"archived":false,"fork":false,"pushed_at":"2016-06-19T13:08:54.000Z","size":3183,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T12:15:00.505Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/zackshen.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":"2016-06-19T12:08:33.000Z","updated_at":"2023-03-05T00:48:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b09dbad-523f-4362-877e-40a551d721ce","html_url":"https://github.com/zackshen/rpi-iot-fan","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zackshen/rpi-iot-fan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackshen%2Frpi-iot-fan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackshen%2Frpi-iot-fan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackshen%2Frpi-iot-fan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackshen%2Frpi-iot-fan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zackshen","download_url":"https://codeload.github.com/zackshen/rpi-iot-fan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackshen%2Frpi-iot-fan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34449277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"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-10-11T04:25:33.308Z","updated_at":"2026-06-17T12:31:54.772Z","avatar_url":"https://github.com/zackshen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 懒人必备\n天气炎热起来了，怕家里小朋友被蚊子咬就盖了个蚊帐，怕小朋友晚上睡觉热就在某宝买了个20多元的小吊扇挂在蚊帐里\n怕小朋友去拖拉小电扇的电线就沿着帐顶布线，结果是开关电扇巨麻烦，站起来还要留个心，别被扇了。\n\n想到压箱底的RaspberryPi，拿出来准备控制一下小电扇还是可以的。\n\n[RaspberryPi的Pinout说明](Raspberry-Pi-v2-Mod-B-Pinout.pdf)\n\n![继电器](relay.jpg)\n\n![小吊扇](fan.jpg)\n\n使用Rpi的Pin11作为信号输出，连接到继电器的IN1。将Rpi的5V和GND连接到继电器的VCC和GND。\n把小电扇的开关盒子拆解掉后，用烙铁将焊接在铜片上的电线融掉拿下。\n把刚才的断头电线的两头接入继电器K1的常开接线柱里。\n\n![relayswitch](relay_k1_switch.jpeg)\n\n![result](IMG_2777.JPG)\n\n最后写点python代码就可以控制小电扇开关了。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzackshen%2Frpi-iot-fan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzackshen%2Frpi-iot-fan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzackshen%2Frpi-iot-fan/lists"}