GithubHelp home page GithubHelp logo

rifqifatih / pipca9685 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from barulicm/pipca9685

0.0 0.0 0.0 21 KB

C++ and Python Library for PCA9685 chips and the Raspberry Pi

License: MIT License

C++ 69.80% Python 1.88% CMake 28.32%

pipca9685's Introduction

PiPCA9685

PiPCA9685 provides an interface for controlling a PCA8695 chip from a Raspberry Pi in C++ and Python.

This library was originally designed to control servos with Adafruit's PWM Hat. It was born out of a desire for C++ bindings, which Adafruit's library lacks.

Installation

  1. Before you begin, make sure your Pi has I2C enabled.

    1. Run sudo raspi-config
    2. Select "Interfacing Options"
    3. Enable I2C automatic loading
  2. Clone repo

    git clone https://github.com/barulicm/PiPCA9685.git
  3. Install dependencies from apt

    cd PiPCA9685
    xargs -a apt_dependencies.txt sudo apt-get install -y
  4. Finally, build and install the library

    cmake -B build
    cmake --build build
    sudo cmake --install build
    cmake --build build --target install_python

NOTE: PiPCA9685 will default to installing the Python library for Python 3. If you'd like to use a different version, you can specify the version in the call to cmake.

cmake -DPYBIND11_PYTHON_VERIONS 2.7 ..

Examples

You can find simple examples of how to use this library in C++ and Python in the examples directory.

C++

To build and run the C++ example, run the following commands in the examples/cpp/ directory.

cmake -B build
cmake --build build
./build/example-cpp

Python

To run the Python example, run the following command in the examples/python/ directory.

python3 example.py

pipca9685's People

Contributors

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