Git Product home page Git Product logo

yalbir's Introduction

YaLbiR - Yet another LED strip controller (but in Rust)

This is a learning project to get to know the usage of an ESP32 with Rust and the control of a WS2812 type LED strip with individually accessible LEDs.

Setup

See setup-steps.txt to look for the dev environment setup. Steps might vary between different operating systems.

I generally used the following links for starters:

Approach

Using the esp-hal crate, the access of things like the RMT to send out data via a GPIO are pretty straight forward. The LED strip expects the data for all LEDs to be sent out in a certain order (highest bit first; order green, blue, red) and consumes the RGB data down the strip. More information be found in the official documentation.

This post helped me to get the timings to encode single bits right.

Run

Connect your ESP32 via the USB port to your PC and make sure serial to USB driver and other tools mentioned in setup-steps.txt are installed. Execute cargo run to compile and upload the binary to the controller. If no connection can be made, press the BOOT button on the ESP for a second or two while the console says "Connecting...".

For some examples, buttons or other devices must be connected to the controller at specific GPIO ports. Read the comments or commit messages for more info about that.

Bluetooth API

The program offers an API via BLE to change patterns and other parameters at runtime. Using an app like "Bluetooth Commander" on Android enables connecting to the BLE endpoint offered by the ESP32 and sending text commands. More docs on the API schema are following.

Roadmap

General features:

  • LED strip RGB encoding
  • Sound reaction
  • [-] Wi-Fi setup
  • [-] Socket for requests
  • Beat setting via button
  • Partition LEDs into groups with different patterns
  • Use observer pattern for beat for animations
  • BLE setup
  • Define command strategy for BLE
  • Internal beat counting system for better e.g. 2x / 0.5x speed changes
  • Define color palettes (primary, secondary, tertiary)

Patterns:

  • Classic Breathing (random colors)
  • Individual breathing
  • Shooting Stars
  • Sliding Rainbow
  • Strobe
  • Strobe to beat
  • Filters (e.g. alpha modifiers, sepia)
  • Background pattern (combination with other pattern)
  • Caterpillar
  • Bounce between walls

yalbir's People

Contributors

akriese avatar

Stargazers

suriija avatar Felix Droop 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.