Git Product home page Git Product logo

pymonarco-hat's Introduction

pymonarco-hat

Python3 wrapper for Monarco HAT C drivers, see Monarco driver repository

Getting started

Before you can use this wrapper you need to clone the Monarco HAT Driver C repository:

Install git and build-dependencies on your Raspberry Pi running Raspbian:

sudo apt update
sudo apt install git build-essential 

Clone the Monarco HAT repository repository:

cd ~
git clone https://github.com/monarco/monarco-hat-driver-c.git

Clone this repository:

cd ~
git clone https://github.com/bjarnekvae/pymonarco-hat.git

Build library

In order for the Python wrapper to work we need to build a library file from the Monarco HAT source code, this can be done like this:

cd ~/pymonarco-hat/monarco-c
make MONARCO_PATH=/path/to/monarco-hat-driver-c-repository

From this "libmonarco.so" will be compiled, this file will be used for the wrapper.

Install wrapper

Run:

cd ~/pymonarco-hat
python3 setup.py install

Run example

cd ~/pymonarco-hat/examples
python3 monarco_example.py /path/to/lib/libmonarco.so

In most cases the script has to be run as root, unless you've given your user right to access the SPI peripheral

Note

  • Counter functionality is not implemented (yet)

Requirements

  • Python 3.6 and above.

License

Under MIT license. See LICENSE.

Authors

pymonarco-hat's People

Contributors

bjarnekvae avatar

Watchers

James Cloos 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.