Giter Site home page Giter Site logo

esp32c3-idf-led-example's Introduction

Rust: esp32c3 RGB LED example

This example for the esp32c3 uses esp-idf and the RMT peripheral to drive the WS2812 RGB LED that's mounted on the respective dev boards (e.g. ESP32-C3-DevKitM-1).

Demo video

The project is based on ivmarkov/rust-esp32-std-hello. The implementation of LedStrip (using the RMT peripheral through esp-idf to drive the LED) is inspired by the respective implementation in esp-idf.

Preparation

  • Install the nightly toolchain of Rust (necessary, because we utilize a few unstable Cargo features): rustup toolchain install nightly
  • Make sure the toolchains are up to date, as one of the utilized unstable Cargo features landed just a few months ago: rustup update
  • Switch to nightly (as per above, necessary for Cargo): rustup override set nightly
  • The build is using the ldproxy linker wrapper from embuild, so install ldproxy:
    • cargo install ldproxy
  • For flashing and monitoring execution, I recommend espflash and espmonitor crates:
    • cargo install espflash espmonitor

Build & Run

Simply build the project using cargo:

cargo build

Next, flash it (you might have to replace /dev/ttyUSB0 with your respective port):

espflash /dev/ttyUSB0 target/riscv32imc-esp-espidf/debug/esp32c3-idf-led-example

If you want to see the output of the program:

espmonitor --speed 115200 /dev/ttyUSB0

esp32c3-idf-led-example's People

Contributors

fkohlgrueber avatar mabezdev avatar

Watchers

 avatar  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.