Giter Site home page Giter Site logo

ehagerty / capablerobot_usbhub_driver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from capablerobot/capablerobot_usbhub_driver

0.0 0.0 0.0 838 KB

Home Page: https://www.crowdsupply.com/capable-robot-components/programmable-usb-hub

License: MIT License

Python 89.14% Kaitai Struct 10.86%

capablerobot_usbhub_driver's Introduction

Capable Robot Programmable USB Hub Driver

This package has two functions:

  • It provides access to internal state of the Capable Robot USB Hub, allowing you to monitor and control the Hub from an upstream computer.
  • It creates a transparent CircuitPython Bridge, allowing unmodified CircuitPython code to run on the host computer and interact with I2C & SPI devices attached to the USB Hub.

Capable Robot logo & image of Programmable USB Hub

Installing

Install and update using pip:

pip install capablerobot_usbhub --upgrade

This driver requires Python 3.6 or newer.

Additional Linux Instructions

On Linux, the the udev permission system will likely prevent normal users from accessing the USB Hub's endpoint which allows for Hub Monitoring, Control, and I2C Bridging. To resolve this, install the provided udev rule:

sudo cp 50-capablerobot-usbhub.rules /etc/udev/rules.d/
sudo udevadm control --reload
sudo udevadm trigger

Then unplug and replug your USB Hub. Note, the provided udev rule allows all system users to access the Hub, but can be changed to a specific user or user group.

Additional Windows Instructions

On Windows, the low-level USB driver for the Hub's VID/PID must be re-assigned from the default one to the libusbk driver. This can be done with the Zadig GUI, or by executing the following commands:

pip install capablerobot_usbregister
usbregister device usbhub

For additional details on how the usbregister command-line utility work, please vist the CapableRobot_USBRegister repository.

Usage & Examples

The examples folder has some code samples of how to use this Python API to control the Programmable USB Hub. There is also another example repository which includes additional host-side code as well as examples of customizing behavior via changing the Hub's firmware.

Working Functionality

  • Reading USB Hub registers over USB and decoding of register data.
  • Writing USB Hub registers over USB.
  • Reading & writing I2C data thru the Hub.
  • Python API to control and read the two GPIO pins.
  • CircuitPython I2C Bridge to the rear I2C1 port.
  • CircuitPython SPI Bridge to the internal mikroBUS header.

Not Working / Not Implemented Yet

No known errata at this time

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

capablerobot_usbhub_driver's People

Contributors

mattvenn avatar nzsmith1 avatar osterwood 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.