Skip to content

Commit a342eb0

Browse files
authored
Fixed section 1 links, added a few more.
Added Primitives, Demo programs and Device drivers to the Contents list. Fixed wrong links to demo programs. Added one new Demo program and two Device drivers links.
1 parent f0971bb commit a342eb0

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

v3/docs/TUTORIAL.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ REPL.
1313
0.1 [Installing uasyncio on bare metal](./TUTORIAL.md#01-installing-uasyncio-on-bare-metal)
1414
1. [Cooperative scheduling](./TUTORIAL.md#1-cooperative-scheduling)
1515
1.1 [Modules](./TUTORIAL.md#11-modules)
16+
1.1.1 [Primitives](./TUTORIAL.md#111-primitives)
17+
1.1.2 [Demo programs](./TUTORIAL.md#112-demo-programs)
18+
1.1.3 [Device drivers](./TUTORIAL.md#113-device-drivers)
1619
2. [uasyncio](./TUTORIAL.md#2-uasyncio)
1720
2.1 [Program structure](./TUTORIAL.md#21-program-structure)
1821
2.2 [Coroutines and Tasks](./TUTORIAL.md#22-coroutines-and-tasks)
@@ -124,7 +127,7 @@ pitfalls associated with truly asynchronous threads of execution.
124127

125128
## 1.1 Modules
126129

127-
### Primitives
130+
### 1.1.1 Primitives
128131

129132
The directory `primitives` contains a Python package containing the following:
130133
* Synchronisation primitives: "micro" versions of CPython's classes.
@@ -137,7 +140,7 @@ The directory `primitives` contains a Python package containing the following:
137140
To install this Python package copy the `primitives` directory tree and its
138141
contents to your hardware's filesystem.
139142

140-
### Demo Programs
143+
### 1.1.2 Demo programs
141144

142145
The directory `as_demos` contains various demo programs implemented as a Python
143146
package. Copy the directory and its contents to the target hardware.
@@ -146,28 +149,29 @@ The first two are the most immediately rewarding as they produce visible
146149
results by accessing Pyboard hardware. With all demos, issue ctrl-d between
147150
runs to soft reset the hardware.
148151

149-
1. [aledflash.py](./as_demos/aledflash.py) Flashes three Pyboard LEDs
152+
1. [aledflash.py](../as_demos/aledflash.py) Flashes three Pyboard LEDs
150153
asynchronously for 10s. Requires any Pyboard.
151-
2. [apoll.py](./as_demos/apoll.py) A device driver for the Pyboard
154+
2. [apoll.py](../as_demos/apoll.py) A device driver for the Pyboard
152155
accelerometer. Demonstrates the use of a task to poll a device. Runs for 20s.
153156
Requires a Pyboard V1.x.
154-
3. [roundrobin.py](./as_demos/roundrobin.py) Demo of round-robin scheduling.
157+
3. [roundrobin.py](../as_demos/roundrobin.py) Demo of round-robin scheduling.
155158
Also a benchmark of scheduling performance. Runs for 5s on any target.
156-
4. [auart.py](./as_demos/auart.py) Demo of streaming I/O via a Pyboard UART.
159+
4. [auart.py](../as_demos/auart.py) Demo of streaming I/O via a Pyboard UART.
157160
Requires a link between X1 and X2.
158-
5. [auart_hd.py](./as_demos/auart_hd.py) Use of the Pyboard UART to communicate
161+
5. [auart_hd.py](../as_demos/auart_hd.py) Use of the Pyboard UART to communicate
159162
with a device using a half-duplex protocol e.g. devices such as those using
160163
the 'AT' modem command set. Link X1-X4, X2-X3.
161-
6. [gather.py](./as_demos/gether.py) Use of `gather`. Any target.
162-
7. [iorw.py](./as_demos/iorw.py) Demo of a read/write device driver using the
164+
6. [gather.py](../as_demos/gather.py) Use of `gather`. Any target.
165+
7. [iorw.py](../as_demos/iorw.py) Demo of a read/write device driver using the
163166
stream I/O mechanism. Requires a Pyboard.
167+
8. [rate.py](../as_demos/rate.py) Benchmark for uasyncio. Any target.
164168

165169
Demos are run using this pattern:
166170
```python
167171
import as_demos.aledflash
168172
```
169173

170-
### Device drivers
174+
### 1.1.3 Device drivers
171175

172176
These are installed by copying the `as_drivers` directory and contents to the
173177
target. They have their own documentation as follows:
@@ -177,8 +181,13 @@ target. They have their own documentation as follows:
177181
altitude and time/date information.
178182
2. [HTU21D](./HTU21D.md) An I2C temperature and humidity sensor. A task
179183
periodically queries the sensor maintaining constantly available values.
180-
3. [NEC IR](./NEC_IR) A decoder for NEC IR remote controls. A callback occurs
184+
3. [NEC IR](./NEC_IR.md) A decoder for NEC IR remote controls. A callback occurs
181185
whenever a valid signal is received.
186+
4. [HD44780](./hd44780.md) Driver for common character based LCD displays
187+
based on the Hitachi HD44780 controller
188+
5. [I2C](./I2C.md) Use Pyboard I2C slave mode to implement a UART-like
189+
asynchronous stream interface. Uses: communication with ESP8266,
190+
or (with coding) interface a Pyboard to I2C masters.
182191

183192
###### [Contents](./TUTORIAL.md#contents)
184193

0 commit comments

Comments
 (0)