-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0328af4
commit 2c95921
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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! |