{"id":17115865,"url":"https://github.com/blundell/zxsensor","last_synced_at":"2025-07-20T20:05:16.615Z","repository":{"id":146560620,"uuid":"100614395","full_name":"blundell/zxsensor","owner":"blundell","description":"ZX Gesture Sensor Driver Library for Android Things","archived":false,"fork":false,"pushed_at":"2018-03-15T12:32:38.000Z","size":359,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T16:55:54.949Z","etag":null,"topics":["androidthings","gesture-detection","i2c","uart","zxsensor"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/blundell.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":"2017-08-17T14:48:02.000Z","updated_at":"2020-06-05T04:00:37.000Z","dependencies_parsed_at":"2023-04-01T14:32:40.613Z","dependency_job_id":null,"html_url":"https://github.com/blundell/zxsensor","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/blundell/zxsensor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blundell%2Fzxsensor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blundell%2Fzxsensor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blundell%2Fzxsensor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blundell%2Fzxsensor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blundell","download_url":"https://codeload.github.com/blundell/zxsensor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blundell%2Fzxsensor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266189676,"owners_count":23890065,"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":["androidthings","gesture-detection","i2c","uart","zxsensor"],"created_at":"2024-10-14T17:47:11.082Z","updated_at":"2025-07-20T20:05:16.600Z","avatar_url":"https://github.com/blundell.png","language":"Java","readme":"ZX Sensor driver for Android Things\n===================================\n\nThis driver supports ZXSensor peripherals using the I2C and UART protocols.\n\nSee the [/library](/library) module for the implementation\n\nSee the [/demo](/demo) module for a working example\n\nHow to use the driver\n---------------------\n\n### Gradle dependency\n\nTo use the `zxsensor` driver, simply add the line below to your project's `build.gradle`,\nwhere `\u003cversion\u003e` matches the last version of the driver available on [jcenter][jcenter].\n\n```\ndependencies {\n    compile 'com.blundell:driver-zxsensor:\u003cversion\u003e'\n}\n```\n\n### Sample usage\n\n```java\nimport com.blundell.zxsensor.ZxSensor;\nimport com.blundell.zxsensor.ZxSensorUart;\n\n// Access the ZXSensor (choose I2C or UART) here we show UART:\n\nZxSensorUart zxSensorUart;\n\ntry {\n    zxSensorUart = ZxSensor.Factory.openViaUart(BoardDefaults.getUartPin());\n} catch (IOException e) {\n    throw new IllegalStateException(\"Can't open, did you use the correct pin name?\", e);\n}\nzxSensorUart.setSwipeLeftListener(swipeLeftListener);\nzxSensorUart.setSwipeRightListener(swipeRightListener);\n\nZxSensor.SwipeLeftListener swipeLeftListener = new ZxSensor.SwipeLeftListener() {\n        @Override\n        public void onSwipeLeft(int speed) {\n            Log.d(\"TUT\", \"Swipe left detected\");\n        }\n    };\n\nZxSensor.SwipeRightListener swipeRightListener = new ZxSensor.SwipeRightListener() {\n        @Override\n        public void onSwipeRight(int speed) {\n            Log.d(\"TUT\", \"Swipe right detected\");\n        }\n    };\n\n// Start monitoring:\n\nzxSensorUart.startMonitoringGestures();\n\n// Stop monitoring:\n\nzxSensorUart.stopMonitoringGestures();\n\n// Close the ZXSensor when finished:\n\nzxSensorUart.close();\n```\n\n\n[jcenter]: https://bintray.com/blundell/maven/driver-zxsensor/_latestVersion\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblundell%2Fzxsensor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblundell%2Fzxsensor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblundell%2Fzxsensor/lists"}