/iot_ruststack_demo

Fullstack IoT demo with Rust frameworks

Primary LanguageRust

IoT Ruststack Demo

Showcase of a demo fullstack project intended for IoT/Embedded domain with using Rust programming language and it's current popular frameworks.

Short description: Raspberry Pi Pico sends measurement data as an HTTP POST request through Pimoroni Wireless Module (based on ESP32) that goes to backend REST API server that saves the data to PostgreSQL database and then serves this data to frontend server.

image

iot_ruststack_demo_showcase

Frontend

Written in Yew. Used Bulma CSS framework for styling.

Backend

Written in Rocket. Used PostgreSQL as database.

Embedded

Used Raspberry Pi Pico with Pimoroni Pico Wireless Pack which uses ESP32 to provide Pico Wi-Fi connectivity. BME280 sensor is used for temperature measurment if possible - if not, value 23.0 is sent.

Drivers and whole software have been written in Rust thanks to guys at Rust Never Sleeps group - check them out!

TODO

  • Finish Tauri deployment
    • Provide correct CORS in Rocket. This will allow tauri app to fetch data from Rocket server without issues

Setup

In frontend run:

trunk serve

In backend run:

ROCKET_ENV=stage cargo run

In embedded:

  • Provide your Wi-Fi SSID and Passphrase in secrets.rs
  • Flash the Raspberry Pi Pico with
cargo run