Git Product home page Git Product logo

pixelclick-rust's Introduction

PixelClick Rust

Hey! This is a playground for me to experiment with @brushknight's awesome PixelClick.

In this master branch, you can see the following areas covered:

  • Playing with the back LEDs (red and blue).
  • Playing with the front addressable LED panel.
  • Async programming with embassy-rs.
  • Checking if the buttons are pressed (no interrupts, concurrent tasks with embassy-rs).
  • Network functionality.

Come on! Go to src/main.rs!

Pinout

This is the device pinout, in particular check for the GPIO labels inside the yellow square which represents the SoC and the labels associated with each of them. This show us what device is connected to each pin, so it's a matter of, taking the outputs as an example, saying if we want to put a HIGH or a LOW on each pin to achieve the effect we want! For the inputs, we would need to check the value somehow and react to it, either via interruptions or some other mean.

Develop with Dev Containers

This repository offers Dev Containers support, for developing quickly with VS Code.

Why do we need this?

The ESP32-S3 board uses an architecture that is not available as a target with the stock Rust toolchains (xtensa-esp32s3-none-elf). It requires a fork of the Rust compiler and LLVM to have this target available. This Dev Container sets up all these dependencies for you and configures Cargo to target this by default (see .cargo/config.toml).

Build the project

  • Terminal approach (useful to quickly edit and add environment variables, just don't commit them if they're sensitive!):

    scripts/build.sh  [debug | release]
    

    If no argument is passed, release will be used as default

  • UI approach:

    The default build task is already set to build the project, and it can be used in VS Code and GH Codespaces:

    • From the Command Palette (Ctrl-Shift-P or Cmd-Shift-P) run the Tasks: Run Build Task command.
    • Terminal-> Run Build Task in the menu.
    • With Ctrl-Shift-B or Cmd-Shift-B.
    • From the Command Palette (Ctrl-Shift-P or Cmd-Shift-P) run the Tasks: Run Task command and select Build.
    • From UI: Press Build on the left side of the Status Bar.

Flash

If you, like me, use Colima for containers in a Mac and had issues exposing the serial device to the container, you can always develop and build the binary from the container and flash the board from outside. Make sure you install either espflash or probe-rs.

Once you have built your project with the script or cargo build or whatever, connect the device to the computer and, from the project's root directory use either:

$  espflash flash --monitor target/xtensa-esp32s3-none-elf/release/<BINARY_NAME> 

or

$ probe-rs run --chip esp32s3 target/xtensa-esp32s3-none-elf/release/<BINARY_NAME>

If you don't have this issue, you can just do the following:

  • Terminal approach:

    • Using flash.sh script:

      scripts/flash.sh [debug | release]
      

      If no argument is passed, release will be used as default

  • UI approach:

    • From the Command Palette (Ctrl-Shift-P or Cmd-Shift-P) run the Tasks: Run Task command and select Build & Flash.
    • From UI: Press Build & Flash on the left side of the Status Bar.

pixelclick-rust's People

Contributors

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