Code Monkey home page Code Monkey logo

matrix-rhal's Introduction

MATRIX Rust Hardware Abstraction Layer

API Crate crates.io Deployment

MATRIX RHAL is the Rust implementation of MATRIX HAL. The goal is to center around calling the MATRIX Kernel Modules and eventually implement all of HAL's features in this layer.

Usage

Breaking changes are going to be really common until v0.1.0

Add this to your Cargo.toml:

[dependencies]
matrix_rhal = "0.0.6"

Roadmap

Below are the current/planned features in RHAL. While this library is being put together, updates will be pushed to crates.io as v0.0.* for users to try.

  • Device information
  • Sensor Reading
    • UV
    • Pressure
    • Humidity
    • IMU
  • Everloop
  • GPIO
    • Digital Input/Output
    • PWM
  • Microphone
  • Documentation

Dependencies

Run the following commands individually on your Raspberry Pi.

# Add matrix repository & key
curl https://apt.matrix.one/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.matrix.one/raspbian $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/matrixlabs.list

# Update packages
sudo apt-get update
sudo apt-get upgrade

# Install MATRIX Init Package
sudo apt-get install matrixio-creator-init

# Restart system
sudo reboot

# Install MATRIX kernel Modules
sudo apt install matrixio-kernel-modules

# Restart a second time
sudo reboot

Building From Source (Raspberry Pi)

Building directly on your Raspberry Pi will lead to slower compilation times, due to the lack processing power.

Install git.

sudo apt install git

Clone the repository.

git clone https://github.com/Hermitter/matrix-rhal

Install Rust on the pi.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Add MATRIX RHAL as a dependency to your Rust project.

Building From Source (Cross Compile)

To reduce compilation times, it's recommended to build RHAL on your computer and deploy it to the Pi. This ends up saving time and sanity during development. Below are some guides to help set up this workflow:

matrix-rhal's People

Contributors

jeikabu avatar

Stargazers

 avatar

Watchers

 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.