Giter Site home page Giter Site logo

ws2812-esp32-rmt-driver's Introduction

ws2812-esp32-rmt-driver

A rust driver library to control WS2812B (NeoPixel) RGB LED pixels/strips using ESP32 RMT (Remote Control) module.

Rust ws2812-esp32-rmt-driver at crates.io API

By disabling the carrier generator of the RMT's transmitter , it can be used as just a PWM signal generator for WS2812B data signal. This control way is the same as major Arduino/C++ library such as FastLED, Adafruit_NeoPixel.

The RMT (Remote Control) module is specific to ESP32. Hence, it can be used only for ESP32 SoC.

This library also support SK6812-RGBW 4-color LED pixels/strips (smart-leds API only).

Usage

Install rust with Xtensa support. Refer esp-rs/rust-build for the setup instruction.

Add following dependency to your Cargo.toml. Note that version is stripped in this example but it is recommended to specify version explicitly in your project.

[dependencies]
esp-idf-sys = { version = "*", features = ["binstart"] }
esp-idf-hal = "*"
smart-leds = "*"

ws2812-esp32-rmt-driver = { version = "*", features = ["smart-leds-trait"] }

[build-dependencies]
embuild = "*"
anyhow = "1"

Refer examples/ directory for the source code.

Make ensure esp toolchain is available and xtensa-esp32-elf-clang is in your $PATH. And then, run as follows

$ cargo build
$ cargo espflash

Features

  • features = ["embedded-graphics-core"] to enable embedded-graphics API ws2812_esp32_rmt_driver::lib_embedded_graphics.
  • features = ["smart-leds-trait"] to enable smart-leds API ws2812_esp32_rmt_driver::lib_smart_leds.
  • default feature to enable just only driver API.

Development

To run the test locally, specify the local toolchain (stable, nightly, etc...) and target explicitly and disable example builds (specify --lib) .

$ cargo +stable test --target x86_64-unknown-linux-gnu --lib

ws2812-esp32-rmt-driver's People

Contributors

cat-in-136 avatar faern avatar kronsyc avatar persello avatar vojty avatar diffshare avatar

Forkers

tomat

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.