GithubHelp home page GithubHelp logo

dyadica / circuitpython_paa5100ej Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 12 KB

A Circuit-Python library for the PAA5100EJ

Home Page: https://dyadica.github.io/blog/a-circuit-python-library-for-the-PAA5100JE/

License: MIT License

Python 100.00%
python circuitpython paa5100ej pmw3901 sensor optical-flow micropython rp2040 circuit-python

circuitpython_paa5100ej's Introduction

PAA5100JE 2-Dimensional Optical Flow Sensor

The PAA5100EJ

This repo contains a quick and dirty Circuit-python port of the Pimoroni PMW3901/PAA5100EJ sensor library. Its the very first thing Ive done in either Python/Circuit-python so ain’t too pretty :) In addition to the aforementioned Pimoroni library; this library was also greatly inspired/aided by the Arduino port by Bitcraze

About the library

A full breakdown of the library, its code and how to use it can be found via an accompanying post here.

Prerequisites

Assuming you already have an already complete Circuit-python installation; in order to use this library you will need to install the Adafruit_Circuit_BusDevice library. This library can be locatated via the previous link or installed via the following pip command:

pip3 install adafruit-circuitpython-busdevice

Installing

One you have installed the required prerequisites all you need to do is place the file paa5100ej.py in your designated library location and the file code.py in its corresponding location on your Circuit-python drive (usually the root).

Notes

  1. This code has only been tested via Adafruit CircuitPython 7.1.1 on an Adafruit Feather RP2040 with rp2040 via Thonny
  2. The code has been targeted for the PAA5100JE only; modification to the init/secret registers may be needed to make it work with the pmw3901. I have updated the code to include these too!
  3. The product page for the used PAA5100JE can be found here.
  4. An accompanying post for the library can be found here.
  5. Enjoy ;)

NB: Since completing the library I discovered an official Pico one for Micropython by Pimoroni so that may be a better option for you? This can be found here At a glance it looks like there may be a few more hoops to go in order to get things up and going; however, I have not tried and/or look into using it yet. Please see their readme for more details!

circuitpython_paa5100ej's People

Contributors

dyadica avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

quadellupine

circuitpython_paa5100ej's Issues

Rename _init_registers_PAA5100 to _init_registers_PAA5100EJ

def _init_registers_PAA5100(self):

Tried this port out and ran into an error on line 55. Line 55 references _init_register_PAA5100EJ but the definition on line 306 is _init_registers_PAA5100.

Fixed it locally and everything worked.

Thanks for porting this to CircuitPython. Just a few typos here and there it seems (like the file is named paa5100ej instead of paa511je). I was half way through doing the same myself when I found this and other than this small typo it works great!

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.