{"id":27113168,"url":"https://github.com/acecentre/movementswitch","last_synced_at":"2026-04-29T00:34:44.256Z","repository":{"id":39074579,"uuid":"273188334","full_name":"AceCentre/MovementSwitch","owner":"AceCentre","description":"On-body switch using a gyroscope to detect small subtle movements and self-adjusts over time","archived":false,"fork":false,"pushed_at":"2022-12-13T04:37:47.000Z","size":2696,"stargazers_count":1,"open_issues_count":21,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-07T02:49:53.846Z","etag":null,"topics":["arduino","assistive-technology","gyroscope","hardware","switch"],"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/AceCentre.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":"2020-06-18T08:50:52.000Z","updated_at":"2021-08-06T02:17:50.000Z","dependencies_parsed_at":"2023-01-28T06:46:08.685Z","dependency_job_id":null,"html_url":"https://github.com/AceCentre/MovementSwitch","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/AceCentre/MovementSwitch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AceCentre%2FMovementSwitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AceCentre%2FMovementSwitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AceCentre%2FMovementSwitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AceCentre%2FMovementSwitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AceCentre","download_url":"https://codeload.github.com/AceCentre/MovementSwitch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AceCentre%2FMovementSwitch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32405901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: 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":["arduino","assistive-technology","gyroscope","hardware","switch"],"created_at":"2025-04-07T02:49:56.666Z","updated_at":"2026-04-29T00:34:44.239Z","avatar_url":"https://github.com/AceCentre.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MovementSwitch\n\n\u003e Hardware project to make a very sensitive, self calibrating and auto-adjusting on-body switch\n\nMovementSwitch is a Arduino project designed to work with a range of Arduino boards (e.g. Arduino Pro micro) and a GY-521 Gyroscope. The device self calibrates to a users movement and a potentiometer can be used to adjust the sensitivity. \n\n![OpenAAC](https://img.shields.io/badge/OpenAAC-%F0%9F%92%AC-red?style=flat\u0026link=https://www.openaac.org)\n\n## Bill of materials\n\n* x1 [Arduino Pro Micro](https://store.arduino.cc/arduino-micro)\n* x1 [Gy-521 Gyroscope-Accelerometer](https://www.amazon.co.uk/WayinTop-MPU-6050-Gyroscope-Accelerometer-Converter/dp/B07P5YXBXV/)\n* x1 [10K Pot](https://shop.pimoroni.com/products/pt10lv-horizontal-trimmer-multiple-values)\n* x1 [Momentary Pushbutton or switch](https://shop.pimoroni.com/products/momentary-pushbutton-switch-12mm-square)\n\n\n## Arduino wiring\n\n* **Pin** 4 - Switch/Pushbutton **State**: Active Low \n* **Pin** A0 - Potentiometer\t**State**: Active Low \n* **Pin** 5 - Switch Output/Relay\t**State**: Active Low \n* **Pin** 3 -  SCL of GY-521\n* **Pin** 2 -  SDA of GY-521\n* **Pin** 7 -  INT of GY-521\n* **Pin** 9 -  Neopixel\n\nSee also this [TinyCad Diagram](https://github.com/AceCentre/MovementSwitch/blob/master/MovementSwitchSCM.dsn) :\n\n\u003cimg src=\"https://raw.githubusercontent.com/AceCentre/MovementSwitch/master/MovementSwitchSCM.png\" width=\"600\"\u003e\n\n\n### Usage\n\nWire it all up. The neopixel displays different colours:\n\n\n* **RED**: On first start for a few seconds as device calibrates. Wait with steady hand until complete\n* **White**: OFF. Waiting to detect movement down* (up is an option)\n* **Green**: ON A single keyboard character* will have been sent to the PC Now waiting to detect movement up*\n* **Yellow**: OFF. Indicates that the user has managed to return further than original OFF position by a factor of 2. Consider reducing Sensitivity\n\n\n**Zero / Reset Button:**\n\nOn press a fast zero will occur and the led will be Purple for a second or less then return to White indicating OFF\n\nIf the unit has had a major movement (dropped etc) and a quick reset is not possible, then the display will colour Red and commence a full reset taking a few seconds in the same manner as starting up.\n\n**Sensitivity Knob:**\n\nMax sensitivity when fully clockwise\n\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n\n## Files\n\nAll the Arduino code is in the sub-directory **MovementSwitch**\n\n* MovementSwitch.ino - Main source code file\n* A_Main.ino - Main Gyro State Machine\n* B_Gyro_.ino - Gyro Read data functions\n* F_MonitorLight.ino - Logging functions. \"Light\" because it is a lightweight version of a more complex version Graham uses in his projects\n\n\n### Required libraries \n\nYou will need **THREE** libraries in your Arduino library folder for this to work:\n\n* [I2Cdevlib](https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/I2Cdev) and the [I2Cdevlib-MPU6050](https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050) Library in your Library folder. \n* [Adafruit Neopixel](https://github.com/adafruit/Adafruit_NeoPixel) Library\n \n\n\n## Documentation Development\n\nWe use [vuepress](http://vuepress.vuejs.org) for documentation \n\n```bash\nyarn dev\nyarn build\n```\n\n\n\n## Credits\n\n* Graham Law - Check out \u003chttp://celticmagic.org\u003e for some great AT hardware. Graham wrote *ALL* of this code. Graham is a legend. Hire him! [See his page here which documents it from his side](https://www.celticmagic.org/movement-detector). \n* Gerard Cullen \u003chttp://www.rhn.org.uk\u003e - Original inspiration and version 1 of this project was down to Gerard\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facecentre%2Fmovementswitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facecentre%2Fmovementswitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facecentre%2Fmovementswitch/lists"}