{"id":16223787,"url":"https://github.com/simleek/robotserial","last_synced_at":"2025-04-08T01:45:56.785Z","repository":{"id":57462476,"uuid":"140371053","full_name":"SimLeek/robotserial","owner":"SimLeek","description":"A library for common serial commands in robotics.","archived":false,"fork":false,"pushed_at":"2018-07-11T00:30:59.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T21:49:01.959Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SimLeek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-10T03:17:12.000Z","updated_at":"2018-07-17T01:14:37.000Z","dependencies_parsed_at":"2022-09-12T13:31:40.739Z","dependency_job_id":null,"html_url":"https://github.com/SimLeek/robotserial","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/SimLeek%2Frobotserial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimLeek%2Frobotserial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimLeek%2Frobotserial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimLeek%2Frobotserial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SimLeek","download_url":"https://codeload.github.com/SimLeek/robotserial/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247761029,"owners_count":20991533,"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-10-10T12:20:10.778Z","updated_at":"2025-04-08T01:45:56.768Z","avatar_url":"https://github.com/SimLeek.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# robotserial\n\nrobotserial is a library that transmits robot sensor and actuator\ninformation through serial ports. It supports USBs as well as any other\nport that supports serial data transmission. Multiple serial ports may\nbe used at once.\n\n# Table of Contents\n1. [Example](#example)\n1. [Installation](#installation)\n1. [License](#license)\n\n-----\n\n## Example\n\nThis will print all values from an attached accelerometer for one\nsecond:\n\n    from robotserial import SerialStateMachineThread\n    import time\n\n    def print_accelerometer(a, b, c):\n        print( \"accelerometer xyz: [{}, {}, {}]\".format(a,b,c))\n\n    ssmt = SerialStateMachineThread()\n    ssmt.start() # accelerometer currently needs to be found before it can be accessed\n\n    ssmt.accelerometer.set_callback( print_accelerometer )\n\n    time.sleep(1)\n    ssmt.join()\n\nThe corresponding code to send the data from an Arduino is currently:\n\n    Serial.write(\"I\");\n    Serial.write(\"\\na\");\n    Serial.write(aX.bytes, 4);Serial.write(aY.bytes, 4);Serial.write(aZ.bytes, 4);\n    Serial.write(\"\\ng\");\n    Serial.write(gX.bytes, 4);Serial.write(gY.bytes, 4);Serial.write(gZ.bytes, 4);\n    Serial.write(\"\\nm\");\n    Serial.write(mX.bytes, 4);Serial.write(mY.bytes, 4);Serial.write(mZ.bytes, 4);\n    Serial.write(\"\\n\");\n\nThis will change once a C/C++ library is made for embedded\n devices.\n\n## Installation\n\n    $ pip install robotserial\n\nrobotserial is distributed on [PyPI](https://pypi.org) as a universal\nwheel and is available on Linux/macOS and Windows and supports\nPython 2.7/3.5+ and PyPy.\n\n## License\n\nrobotserial is distributed under the terms of both\n\n- [MIT License](https://choosealicense.com/licenses/mit)\n- [Apache License, Version 2.0](https://choosealicense.com/licenses/apache-2.0)\n\nat your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimleek%2Frobotserial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimleek%2Frobotserial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimleek%2Frobotserial/lists"}