Skip to content

Hahihula/m5stack-atom-matrix-rust-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

M5Stack Atom Matrix Rust Examples (no_std)

M5Stack Atom Matrix M5Stack Atom Matrix Scheme

This repository provides no_std Rust examples for the M5Stack Atom Matrix board. The examples demonstrate how to interact with the device's LED matrix and other peripherals using Rust in a bare-metal environment.

Key Features:

  • no_std Support: Designed for embedded systems, avoiding the standard library.
  • Clear Examples: Step-by-step examples for common functionalities.
  • Easy Setup: Comprehensive instructions for getting started.

Resources:

Quick Start

  1. Clone the Repository:

    git clone [https://github.com/hahihula/m5stack-atom-matrix-rust-examples.git](https://github.com/hahihula/m5stack-atom-matrix-rust-examples.git)
    cd m5stack-atom-matrix-rust-examples
  2. Build and Flash the led_matrix Example:

    cargo build --release --example led_matrix
    cargo espflash flash --release --example led_matrix
  3. Monitor Serial Output (Optional):

    cargo espflash monitor

Detailed Setup

If you don't have Rust and the necessary tools installed, follow these steps:

1. Install Rust and Nightly Toolchain

  1. Install Rustup:

    • Visit rustup.rs and follow the installation instructions for your operating system.
  2. Add the Nightly Toolchain:

    rustup toolchain install nightly
    rustup default nightly
  3. Add the Xtensa Target:

    rustup target add xtensa-esp32-none-elf

2. Install espup and ESP-IDF

  1. Install espup:

    cargo install espup
  2. Install ESP-IDF:

    espup install
    • Follow the prompts to install the required ESP-IDF components.

3. Install cargo-espflash

  1. Install cargo-espflash:

    cargo install cargo-espflash
  2. Verify Installation:

    cargo espflash --version

4. Clone and Build

  1. Clone the Repository:

    git clone [https://github.com/hahihula/m5stack-atom-matrix-rust-examples.git](https://github.com/hahihula/m5stack-atom-matrix-rust-examples.git)
    cd m5stack-atom-matrix-rust-examples
  2. Connect the M5Stack Atom Matrix:

    • Connect the device to your computer via USB-C.
  3. Build and Flash Examples:

    • For example, to build and flash the led_matrix example:

      cargo build --release --example led_matrix
      cargo espflash flash --release --example led_matrix
  4. Monitor Serial Output (Optional):

    • To view serial output:

      cargo espflash monitor

Examples

  • led_matrix: Basic LED matrix control.
    • Build and flash: cargo espflash flash --release --example led_matrix

Contributing

Contributions are welcome! If you have any examples or improvements, feel free to submit a pull request.

License

MIT

About

M5Stack Atom-Matrix Rust example repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages