{"id":20766087,"url":"https://github.com/jakesmd/fastpin","last_synced_at":"2026-05-17T17:38:59.376Z","repository":{"id":262994767,"uuid":"888955511","full_name":"JakesMD/FastPin","owner":"JakesMD","description":"An Arduino library for safe and high-speed digital read/write operations.","archived":false,"fork":false,"pushed_at":"2024-11-24T16:51:09.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T06:23:22.656Z","etag":null,"topics":["arduino","arduino-library","digitalread","digitalwrite"],"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/JakesMD.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-11-15T10:25:32.000Z","updated_at":"2024-11-24T16:51:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"18acf19f-92b7-4e23-8a00-59f1a2e40da6","html_url":"https://github.com/JakesMD/FastPin","commit_stats":null,"previous_names":["jakesmd/fastpin"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakesMD%2FFastPin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakesMD%2FFastPin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakesMD%2FFastPin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakesMD%2FFastPin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JakesMD","download_url":"https://codeload.github.com/JakesMD/FastPin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243093937,"owners_count":20235461,"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":["arduino","arduino-library","digitalread","digitalwrite"],"created_at":"2024-11-17T11:21:06.696Z","updated_at":"2026-05-17T17:38:54.340Z","avatar_url":"https://github.com/JakesMD.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastPin\n\nAn Arduino library for safe and high-speed digital read/write operations.\n\n## Stats\nThese stats were generated by running `Speed_Text.ino` on an Arduino clone.\n\nThe test measures how long it takes for the function to run 1,000 times and calculates the average duration. This process is repeated 1,000 times, and the final result is the average of all these averages. This approach compensates for the ±4 microsecond accuracy limitation of `micros()`.\n\n### Read\n- 1.32 microseconds\n- 4.28 times faster than `digitalRead (5.66 microseconds)`\n\n### Write\n- 2.08 microseconds\n- 2.36 times faster than `digitalWrite (4.91 microseconds)`\n\n## Usage\n``` cpp\n#include \u003cFastPin.h\u003e\n\nFastWritePin ledPin(LED_BUILTIN);\nFastReadPin buttonPin(2);\n\nvoid setup() {\n    ledPin.begin();\n    buttonPin.begin(true);\n}\n\nvoid loop() {\n    ledPin.write(buttonPin.read());\n    delay(50);\n}\n```\n\n\u003e ⚠️ FastPin only disables PWM timers in `begin()`. DO NOT use `analogWrite()` on the same pin.\n\n## Optimizing Analog Reads for Speed\nAnalog reads are typically platform-specific operations. Nick Gammon has an excellent article detailing techniques to accelerate analog readings. You can explore it [here](https://www.gammon.com.au/adc).\n\n## Contributions Welcome\n\nWe're open to contributions, especially for improvements in speed and efficiency. Feel free to open issues or pull requests with optimizations, feature requests, or bug reports to help make this project even better. Your input is valuable and appreciated!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakesmd%2Ffastpin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakesmd%2Ffastpin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakesmd%2Ffastpin/lists"}