{"id":26916803,"url":"https://github.com/zdanowiczkonrad/pythonsphero","last_synced_at":"2026-03-16T08:02:36.880Z","repository":{"id":21803421,"uuid":"25126000","full_name":"zdanowiczkonrad/PythonSphero","owner":"zdanowiczkonrad","description":"Examples of programming Sphero using Python client","archived":false,"fork":false,"pushed_at":"2017-04-24T08:27:51.000Z","size":45,"stargazers_count":39,"open_issues_count":3,"forks_count":15,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-04-16T12:00:19.261Z","etag":null,"topics":["programming-tutorial","python","robotics","sphero"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/zdanowiczkonrad.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}},"created_at":"2014-10-12T17:09:03.000Z","updated_at":"2024-02-14T23:58:15.000Z","dependencies_parsed_at":"2022-08-19T23:01:40.006Z","dependency_job_id":null,"html_url":"https://github.com/zdanowiczkonrad/PythonSphero","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdanowiczkonrad%2FPythonSphero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdanowiczkonrad%2FPythonSphero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdanowiczkonrad%2FPythonSphero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdanowiczkonrad%2FPythonSphero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zdanowiczkonrad","download_url":"https://codeload.github.com/zdanowiczkonrad/PythonSphero/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246706181,"owners_count":20820784,"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":["programming-tutorial","python","robotics","sphero"],"created_at":"2025-04-01T19:49:46.915Z","updated_at":"2026-03-16T08:02:31.849Z","avatar_url":"https://github.com/zdanowiczkonrad.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Sphero Examples \u0026 Tutorials\n\nThis repository contains materials for easy learning of programming [Sphero](http://www.gosphero.com/) using [Python language](https://www.python.org/) and the [Sphero Kulka API](https://github.com/karol-szuster/kulka) by [Karol Szuster](https://github.com/karol-szuster). It is designed for a total programming/Python/robotics newbie.\n\nDirectory ```tutorials``` contains a complete guide that introduces each Sphero function step by step with explanation, hints, scaffolding code and microtasks, meanwhile ```examples``` is a place, where fully functional and standalone examples are placed for your experiments.\n\n## Configuration\n\nMake sure that Python is installed on your machine, as well as Python Sphero client module:\n```sh\npip install kulka\n```\nAdd Sphero device to the OS (double tap the Orb to wake it up and pair it to your PC via bluetooth). Then, You may use the kulka to connect with the device (knowing it's mac address) in such way:\n```python\nfrom kulka import Kulka\nfrom random import randint\n\nwith Kulka('01:02:03:04:05:06') as kulka:\n    kulka.set_inactivity_timeout(3600)\n    kulka.roll(randint(0, 255), randint(0, 359))\n```\nShould the Sphero be properly paired and the Sphero's device mac correctly set, you can go ahead, run the code and have fun with it!\n\n## Usage\n\n### Examples\n\nRun examples with:\n```sh\npython spheroCircle.py\n```\nAfter you've finished games \u0026 stuff, tell the Sphero to go to sleep:\n```sh\npython spheroSleep.py\n```\n\n### Tutorials\n\nBasically, each main directory beginning with a number is a group of smaller tasks, that utilize a specific area of Sphero programming. Explore four sections, namely:\n* 1. Hello Sphero\n* 2. Sphero basics\n* 3. Advanced movement\n* 4. Sphero guess game\n\nEach small task is to be done one by one, beginning from the first task. To start the tutorial, open the ```1_\u003ctaskname\u003e.py``` file in Sublime, ekhm I meant some good text editor you surely have. There is a description of each task with microtask listed. You may freely modify each file and run it over and over again using simply ```python sometask.py```.\n\nThose examples will guide you through communicating with Sphero, modifying its state (colors or backled light), rotating it and rolling. Last task is also a good practice for Python beginners, where a goal is to implement a game of guessing the number, step by step using feature-oriented programming, where each new functionality is added to the old ones in each and only step.\n\nIn order to promote an awesome Polish language, all comments and namings are Polish words ;) A jeżeli rozumiesz co tutaj jest napisane, zapraszam Cię na świetne szkolenia dla początkujących programistów Pythona (i nie tylko) organizowanych przez Geek Girls Carrots, gdzie na żywo prowadzimy uczestników przez te zadania.\n\n### Notes\n\nThis software has been tested on Windows and Linux with Sphero1/2 and has code improvements that significantly reduced problems with timeouts and connection drops. Moreover, it is Python 2.x and Python 3.x compatible. There's a known issue with running this code on OS X, that is related to limited compatibility of [bluetooth connector](https://github.com/karulis/pybluez) with this platform. If you would like to try this code on OS X, please checkout our [first release](https://github.com/zdanowiczkonrad/PythonSphero/releases/tag/v1.0.0) using [default Sphero API lib](https://github.com/faulkner/sphero) (beware, it is Python 2.x compatible only). For more sphero-experience check out awesome educational materials on the official Sphero's [Education site](http://www.gosphero.com/education/) that partially inspired the code snippets here. Aw, did I mention that [Sphero](http://www.gosphero.com/) is really cool for playing and learning and (playing and learning)?\n\n### License\nCC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdanowiczkonrad%2Fpythonsphero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzdanowiczkonrad%2Fpythonsphero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdanowiczkonrad%2Fpythonsphero/lists"}