Skip to content

Commit d0625b5

Browse files
authored
Update main README and demo/README (#284)
* Update main README and demo/README * Update README, remove double spaces, bold some sections, etc
1 parent 4a85fd2 commit d0625b5

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ for ev3dev. The first allows you to run this program from Brickman, while the
126126
second imports this library.
127127

128128
When saving Python files, it is best to use the ``.py`` extension, e.g. ``my-file.py``.
129+
To be able to run your Python code, **your program must be executable**. To mark a
130+
program as executable run ``chmod +x my-file.py``. You can then run ``my-file.py``
131+
via the Brickman File Browser or you can run it from the command line via ``$ ./my-file.py``
129132

130133
User Resources
131134
--------------

demo/README.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,45 @@
11
# ev3dev demo programs
22

3-
This folder contains a bunch of demo programs that you can use to help you in
3+
This folder contains several demo programs that you can use to help you in
44
developing your own code. Brief descriptions of each demo are provided below;
55
you can access the full source code and some more detailed information on each
66
by opening the respective folders above.
77

8+
To install these on your EV3, use git to clone the ev3dev-lang-python repository
9+
from github. Your EV3 will need Internet connectivty in order to clone the
10+
repository from github.
11+
```
12+
$ sudo apt-get install git
13+
$ git clone https://github.com/rhempel/ev3dev-lang-python.git
14+
```
15+
16+
## Running A Program
17+
There are two ways to run a program. You can run a program from the command line
18+
or from the brickman interface.
19+
20+
Note that for both running from the command line and running from Brickman the
21+
program **must be marked as an executable** and the **first line of the program
22+
must be** `#!/usr/bin/env python3`. To mark a program as executable run
23+
`chmod +x PROGRAM_NAME.py`. All of the demo programs are already marked as
24+
executable and already have `#!/usr/bin/env python3` so you should be fine, we
25+
only mention it so you know to do these things when writing your own programs.
26+
27+
## Command Line
28+
To run one of the demo programs from the command line, cd to the directory and
29+
run the program via `./PROGRAM_NAME.py`. Example:
30+
```
31+
$ cd ev3dev-lang-python/demo/R3PTAR/
32+
$ ./r3ptar.py
33+
```
34+
## Brickman
35+
To run one of the demo programs from Brickman, select the program in the
36+
File Browser.
37+
38+
## Demo Programs
839
### BALANC3R
940

10-
Laurens Valk's BALANC3R - This robot uses the gyro sensor to balance on two wheels. Use the IR remote to control BALANC3R
41+
Laurens Valk's BALANC3R - This robot uses the gyro sensor to balance on two
42+
wheels. Use the IR remote to control BALANC3R
1143

1244
* http://robotsquare.com/2014/07/01/tutorial-ev3-self-balancing-robot/
1345

@@ -31,7 +63,8 @@ David Gilday's MINDCUB3R
3163

3264
### TRACK3R
3365

34-
A basic example of Object Oriented programming where there is a base TRACK3R class with child classes for the various permutations of TRACK3R
66+
A basic example of Object Oriented programming where there is a base TRACK3R
67+
class with child classes for the various permutations of TRACK3R
3568

3669
* http://www.lego.com/en-us/mindstorms/build-a-robot/track3r
3770
* TRACK3R.py

0 commit comments

Comments
 (0)