Skip to content

IvanArkhipov1999/martos-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust example for xtensa esp32 architecture

Presented here is a straightforward ESP‑NOW ⇄ UART bridge Rust example utilizing Martos.

Within the setup function, UART2 is configured at 57600 baud (8N1) on RX=GPIO9 and TX=GPIO10, ESP‑NOW is initialized, and informative messages are printed once. Additionally, within the loop function, incoming ESP‑NOW hex payloads are decoded and written to UART, while bytes read from UART are converted to uppercase hexadecimal and broadcast over ESP‑NOW. Processing occurs continuously, including every 32 accumulated bytes or when the buffer is full.

How to install dependencies

For comprehensive guidance on installing the necessary dependencies for developing applications targeting the Xtensa ESP32 architecture, please refer to the official website. Below is an illustrative example demonstrating the installation of building toolchains on a Linux (Ubuntu/Debian):

apt-get -qq update
apt-get install -y -q build-essential curl
curl https://sh.rustup.rs -sSf | sh -s -- -y
cargo install espup
espup install

How to build the example

For a thorough guide on developing projects for the Xtensa ESP32 architecture across various operating systems, we recommend consulting the official website. Below, you will find an illustrative example showcasing the building process on a Linux system (Ubuntu/Debian):

. $HOME/export-esp.sh
cargo build

How to run the example

For detailed instructions on running projects for the Xtensa ESP32 architecture across various operating systems, we recommend consulting the official website. Below, you will find an illustrative example showcasing the running on a Linux system (Ubuntu/Debian):

cargo run

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages