Git Product home page Git Product logo

stepper_rpi's Introduction

StepperRpi

Provides a simple and a convenient way to control a stepper motor from the Raspberry Pi board. There are a lot of different stepper motors and a various drivers to control them, and this library takes this into account and provides a couple of abstractions - implementing them we can control literally any stepper motor without touching the main interface.

Installation

Add this line to your application's Gemfile:

gem 'stepper_rpi', github: 'sergio1990/stepper_rpi'

And then execute:

$ bundle install

Usage

There are various drivers available for stepper motors control, such as:

  • ULN2003
  • A4988
  • DRV8825
  • etc...

Also, there are various gems available in order to perform GPIO management on Raspberry Pi.

In order to make this library useful for the most possible cases, two abstractions were added:

  • abstract driver
  • abstract GPIO adapter

The class diagram represents all the mentioned abstractions and their relationships with another classes:

stepper_rpi classes diagram

Hence, in order to use this library the next things should be implemented:

  • a driver - according to the microchip you're going to use; the driver for the ULN2003 chip is available OOTB
  • a GPIO adapter - no adapter available OOTB so far, just use your favorite GPIO wrapper gem when implementing your own GPIO adapter

Please, visit the examples folder to get insights about how to use the library.

Tests

This library was successfully tested using the following hardware combinations:

  • Raspberry Pi Zero W v1.1; ULN2003 driver shield; 28BYJ-48-5V stepper motor
  • Raspberry Pi Zero 2 W; DRV8825 driver shield; NEMA14 JK35HS34-1004 stepper motor

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/sergio1990/stepper_rpi.

License

The gem is available as open source under the terms of the MIT License.

stepper_rpi's People

Contributors

sergio1990 avatar

Watchers

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