diff --git a/README.md b/README.md index 7599d84..77f1f1c 100644 --- a/README.md +++ b/README.md @@ -8,33 +8,33 @@ style. The code worked well, but was very messy and hard to understand. This repository is an attempt to clear up the code and make it easier to understand. -The main file 'led_cube.py' imports core operations from 'core.py' and patterns -from the subdirectory '/patterns'. It can be run by 'cd'-ing into the project -directory, then executing 'sudo python led_cube.py'. +The main file `led_cube.py` imports core operations from `core.py` and patterns +from the subdirectory `/patterns`. It can be run by "cd-ing" into the project +directory, then executing `sudo python led_cube.py`. -'core.py' contains code to update the LED cube display. This code runs in a -separate thread at program start, in sort of a 'set-and-forget' manner. +`core.py` contains code to update the LED cube display. This code runs in a +separate thread at program start, in sort of a "set-and-forget" manner. -'/patterns/plot.py' contains the fundamental plotting functions, which act +`/patterns/plot.py` contains the fundamental plotting functions, which act as the interface between the display updater and the patterns. When making your own patterns, you can either put them inside one of the existing module files (which group patterns according to what they do) or create your own module file. If you add your own module file, you will have to import -it at the top of 'led_cube.py' by adding 'from patterns. import *'. +it at the top of `led_cube.py` by adding `from patterns. import *`. -The LED cube is choreographed by Sequence objects, which are built from patterns -defined in files in the '/patterns' subdirectory. Sequences require patterns to -accept three parameters: a "variation" string, the number of repetitions, and -the number of seconds to wait between 'frames' of the pattern. These three -parameters, along with the function name, are passed to the Sequence on creation +The LED cube is choreographed by `Sequence` objects, which are built from patterns +defined in files in the `/patterns` subdirectory. `Sequences` require patterns to +accept three parameters: a `"variation"` string, the number of repetitions, and +the number of seconds to wait between "frames" of the pattern. These three +parameters, along with the function name, are passed to the `Sequence` on creation in a list. -The Sequence can be run with sequence.run(n, dt), where n is the number of -times the Sequence should run (and if n > 9999, the Sequence runs forever) and -dt is the time in seconds between frames. The Sequence class is somewhat +The `Sequence` can be run with `sequence.run(n, dt)`, where `n` is the number of +times the `Sequence` should run (and if n > 9999, the `Sequence` runs forever) and +`dt` is the time in seconds between frames. The `Sequence` class is somewhat restrictive, so you don't have to use it if your patterns are more complicated. -At the bottom of 'led_cube.py' there is a marked section, put your patterns +At the bottom of `led_cube.py` there is a marked section, put your patterns and sequence runs inside that section.