Skip to content

Commit 0e6420f

Browse files
author
Konrad Zdanowicz
committed
Readme update
1 parent 37bbc28 commit 0e6420f

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
#Python Sphero Examples & Tutorials
22

3-
This repository contains materials for programming [Sphero](http://www.gosphero.com/) using [Python language](https://www.python.org/) and the [Sphero Python client library](https://github.com/faulkner/sphero) for a total programming/Python/robotics newbie.
3+
This 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.
44

55
Directory ```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.
66

7-
##Note
8-
We'll soon move on to a new Python Sphero API made by [Karol Szuster](https://github.com/karol-szuster) - [kulka](https://github.com/karol-szuster/kulka)
9-
107
##Configuration
118

129
Make sure that Python is installed on your machine, as well as Python Sphero client module:
1310
```sh
14-
pip install sphero
11+
pip install kulka
1512
```
16-
Add Sphero device to the OS (double tap the Orb to wake it up and pair it to your PC via bluetooth). Then, on the top of each source code file, find the line:
13+
Add 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:
1714
```python
18-
s = core.Sphero("/dev/tty.Sphero-OOB-AMP-SPP")
15+
from kulka import Kulka
16+
from random import randint
17+
18+
with Kulka('01:02:03:04:05:06') as kulka:
19+
kulka.set_inactivity_timeout(3600)
20+
kulka.roll(randint(0, 255), randint(0, 359))
1921
```
20-
and make sure that an appropriate device name is set. Should the Sphero be properly paired and the Sphero's device name correctly set, you can go ahead, run the code and have fun with it!
22+
Should 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!
2123

2224
##Usage
2325

@@ -42,13 +44,13 @@ Basically, each main directory beginning with a number is a group of smaller tas
4244

4345
Each small task is to be done one by one, beginning from the first task. To start the tutorial, open the ```1_<taskname>.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```.
4446

45-
Those 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 old ones in each and only step.
47+
Those 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.
4648

4749
In 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.
4850

4951
###Notes
5052

51-
This software has been tested on OS X 10.9 and Sphero 2.0. I also use Python 2.7 legacy ```raw_input```, so be aware of that when your Python > 3 explodes. Fore more spherexperience 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)?
53+
This 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)?
5254

5355
###License
54-
CC, I mean go fork it & contribute!
56+
CC

0 commit comments

Comments
 (0)