Mercurial > d1workshop
changeset 39:b868c99363cb
Add d1motor shield example
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Mon, 10 Oct 2016 01:19:08 +0200 |
| parents | c02c1acc9ac0 |
| children | 118ae741d9d0 |
| files | shields.rst |
| diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/shields.rst Mon Oct 10 01:13:47 2016 +0200 +++ b/shields.rst Mon Oct 10 01:19:08 2016 +0200 @@ -116,7 +116,14 @@ Up to four such shields can be connected at the same time, provided they have different addresses selected using the jumpers at their backs. -At the moment there is no ready-to-use library to control this shield. +In order to use this shield, use the ``d1motor`` library:: + + import d1motor + from machine import I2C, Pin + i2c = I2C(Pin(5), Pin(4), freq=10000) + m0 = d1motor.Motor(0, i2c) + m1 = d1motor.Motor(1, i2c) + m0.speed(5000) Micro SD
