Giter VIP home page Giter VIP logo

linearactuatorlib's Introduction

LinearActuatorLib

Simple library for controlling linear actuators (and anything similar) using forward & backward pins. Made for use with Arduino, Teensy or Particle boards, but will work with anything using an Arduino style API.

This is not really a fully featured library, but it's general and I find it useful when using actuators that have some sort of auto-stop at the ends. I've used this with actuators from Linak and a couple chinese companies. Feel free to use it as a basis for your own libraries also as the code is quite simple to understand and extend.

Installing

Just follow these instructions to install manually.

Usage

Create one or more instances of actuators. Call the begin-method to tell the library what pins to use for each of the instances.

instance.begin( reversePin, forwardPin)

You can then create your own code to move the actuator using the following commands:

instance.out();
instance.in();
instance.off();

To have the library handle the timing, you can optionally set distance and duration for the in/out movement and time in between using the longer method:

instance.begin( reversePin, forwardPin, secondsToMove, secondsToWait)

By using this command, you just set it up once and it will cycle forever as long as you remember to call:

instance.maintain( millis() );

Have a look at the example files to see a full working example.

Support

I can not offer support for a free library like this, but you could always hire me as a consultant if you need help: https://maketronics.no

linearactuatorlib's People

Contributors

jenschr avatar

Stargazers

 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.