{"id":15655093,"url":"https://github.com/araffin/python-arduino-serial","last_synced_at":"2025-08-19T05:09:18.279Z","repository":{"id":112521659,"uuid":"124662380","full_name":"araffin/python-arduino-serial","owner":"araffin","description":"A simple and robust serial communication protocol. It was designed for Arduino but can be used for other purposes (e.g. bluetooth, sockets). This is the Python implementation.","archived":false,"fork":false,"pushed_at":"2023-04-10T17:18:43.000Z","size":47,"stargazers_count":33,"open_issues_count":0,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-05T03:17:45.587Z","etag":null,"topics":["arduino","bluetooth","communication","protocol","python","raspberry-pi","serial","sockets"],"latest_commit_sha":null,"homepage":"https://python-arduino-serial.readthedocs.io","language":"Python","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/araffin.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-10T14:16:49.000Z","updated_at":"2025-04-28T04:26:58.000Z","dependencies_parsed_at":"2023-05-15T15:00:18.945Z","dependency_job_id":null,"html_url":"https://github.com/araffin/python-arduino-serial","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/araffin/python-arduino-serial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/araffin%2Fpython-arduino-serial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/araffin%2Fpython-arduino-serial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/araffin%2Fpython-arduino-serial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/araffin%2Fpython-arduino-serial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/araffin","download_url":"https://codeload.github.com/araffin/python-arduino-serial/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/araffin%2Fpython-arduino-serial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271103202,"owners_count":24699646,"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","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"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":["arduino","bluetooth","communication","protocol","python","raspberry-pi","serial","sockets"],"created_at":"2024-10-03T12:56:03.187Z","updated_at":"2025-08-19T05:09:18.254Z","avatar_url":"https://github.com/araffin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Robust Arduino Serial Protocol in Python\n\n![CI](https://github.com/araffin/python-arduino-serial/workflows/CI/badge.svg) [![Documentation Status](https://readthedocs.org/projects/python-arduino-serial/badge/?version=latest)](https://python-arduino-serial.readthedocs.io/en/latest/?badge=latest)\n\n**Robust Arduino Serial** is a simple and robust serial communication protocol. It was designed to make two arduinos communicate, but can also be useful when you want a computer (e.g. a Raspberry Pi) to communicate with an Arduino.\n\nIt supports Python 3.8+.\n\nThis repository is part of the Robust Arduino Serial project, main repository: [https://github.com/araffin/arduino-robust-serial](https://github.com/araffin/arduino-robust-serial)\n\n**Please read the [Medium Article](https://medium.com/@araffin/simple-and-robust-computer-arduino-serial-communication-f91b95596788) to have an overview of this protocol.**\n\nDocumentation: [https://python-arduino-serial.readthedocs.io](https://python-arduino-serial.readthedocs.io)\n\nImplementations are available in various programming languages:\n\n- [Arduino](https://github.com/araffin/arduino-robust-serial)\n- [Python](https://github.com/araffin/python-arduino-serial)\n- [C++](https://github.com/araffin/cpp-arduino-serial)\n- [Rust](https://github.com/araffin/rust-arduino-serial)\n\n## Installation\n\nUsing pip:\n```\npip install robust_serial\n```\n\nFrom Source:\n```\ngit clone https://github.com/araffin/python-arduino-serial.git\npip install -e .\n```\n\n## Tests\nRun the tests (require pytest):\n```\nmake pytest\n```\n\n## Examples\n\nRead write in a file (WARNING: the file will be deleted when the script exits)\n```\npython -m examples.file_read_write -f test.txt\n```\n\nSerial communication with an Arduino: [Arduino Source Code](https://github.com/araffin/arduino-robust-serial/tree/master/arduino-board/)\n```\npython -m examples.arduino_serial\n```\n\n### Example: Communication with Sockets\n\nIt can be useful when you want two programs to communicate over a network (e.g. using wifi) or even locally on the same computer (e.g. when you want a python2 script that communicates with a python3 script).\n\n1. Start the server:\n```\npython -m examples.socket_example --server\n```\n\n2. Run the client:\n```\npython -m examples.socket_example --client\n```\n\n### Bluetooth Example with Two Computers\n\nDependencies:\n```\nsudo apt-get install libbluetooth-dev bluez\npip install pybluez\n```\n\nYou need to change the server mac address `SERVER_ADDR`, you can use `hciconfig` to know the mac address of your computer.\n\nServer:\n```\npython -m examples.bluetooth_example --server\n```\n\nClient:\n```\npython -m examples.bluetooth_example --client\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faraffin%2Fpython-arduino-serial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faraffin%2Fpython-arduino-serial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faraffin%2Fpython-arduino-serial/lists"}