Skip to content

Commit

Permalink
added first draft of README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzuger committed Oct 30, 2019
1 parent 0328af4 commit 2c95921
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,68 @@
# tlc5947-rgb-micropython

## Table of Contents
+ [About](#about)
+ [Getting Started](#getting_started)
+ [Usage](#usage)

## About <a name = "about"></a>
This is a driver for the [TLC5947](http://www.ti.com/product/TLC5947) 24 Channel 12bit PWM Led driver.

## Getting Started <a name = "getting_started"></a>

### Prerequisites
This driver is designed for [micropython](https://github.com/micropython/micropython).

```
git clone --recurse-submodules https://github.com/micropython/micropython.git
```

to compile the project, [make](https://www.gnu.org/software/make/),
[gcc](https://gcc.gnu.org/) and [arm-none-eabi-gcc](https://gcc.gnu.org/) is required,
install them from your package manager

### Installing
[tlc5947-rgb-micropython](https://github.com/peterzuger/tlc5947-rgb-micropython) will only work on the stm32 port.

First create a modules folder next to your copy of [micropython](https://github.com/micropython/micropython).

```
project/
├── modules/
│ └──tlc5947-rgb-micropython/
│ ├──...
│ └──micropython.mk
└── micropython/
├──ports/
... ├──stm32/
...
```

And now put this project in the modules folder.

```
cd modules
git clone https://gitlab.com/peterzuger/tlc5947-rgb-micropython.git
```

Now that all required changes are made, it is time to build [micropython](https://github.com/micropython/micropython),
for this cd to the top level directory of [micropython](https://github.com/micropython/micropython).
From here, first the mpy-cross compiler has to be built:
```
make -C mpy-cross
```

once this is built, compile your port with:
```
make -C ports/stm32/ USER_C_MODULES=../modules CFLAGS_EXTRA=-DMODULE_TLC5947_ENABLED=1
```

and you are ready to use tlc5947.

## Usage <a name = "usage"></a>
The module is available by just importing tlc5947:
```
import tlc5947
```

The module documentation is coming soon!

0 comments on commit 2c95921

Please sign in to comment.