GithubHelp home page GithubHelp logo

sigwinch28 / blinken Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 43 KB

ESP32 code for PWM LED strip

Makefile 10.84% C 82.11% C++ 4.38% Python 2.66%
programming useless-topics is-this-like-a-hashtag

blinken's Introduction

# Blinken

Source code for the `blinken` project, an ESP32-based smart LED strip complete
with line protocol library and python bindings.

## Building

```
make all test
```

Output in `build/`.

### Requirements

- GNU Make
- [Check](https://libcheck.github.io/check/)
- [ESP-IDF](http://esp-idf.readthedocs.io/)
- Python 2.7 dev headers (`libpython2.7-dev` on debian)

## Library

```
make lib
```

A shared library for parsing and generating messages used in the wire protocol.

The format is relatively simple:

### Wire format

```
DIGIT = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'

CHANNEL_FIELD = 'R' | 'G' | 'B' | 'W'
TIME_FIELD    = 'T'

CHANNEL_VALUE = DIGIT+ # value 0-255 inclusive, optional leading zeroes
TIME_VALUE    = DIGIT+ # value 0-2147483647 inclusive, optional leading zeroes

CHANNEL_SETTING = CHANNEL_FIELD CHANNEL_VALUE
TIME_SETTING    = TIME_FIELD    TIME_VALUE

SETTING = CHANNEL_SETTING | TIME_SETTING

MESSAGE = SETTING+
```

#### Examples

| Message      | Red | Green   | Blue    | White   | Time    |
| `R0G0B0W0T0` | 0   | 0       | 0       | 0       | 0ms     |
| `R255T1000`  | 255 | not set | not set | not set | 1000ms  |
| `R0G255`     | 0   | 255     | not set | not set | not set |


## Python Library

```
make python
```

This is a C extension for python 2. The above command invokes
`python2 setup.py sdist` with a custom build target directory.

## ESP32 source code

```
export ESP_PATH="../path/to/esp-toolchain"
export PATH="$ESP_PATH:$PATH"
export IDF_PATH="../path/to/esp-idf"

cd esp
make menuconfig # configure "Blinken" component
make all
make flash # with esp plugged in
```

blinken's People

Contributors

sigwinch28 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.