Giter Club home page Giter Club logo

wemos-motor-shield-remake-arduino's Introduction

Wemos Motor Shield Remake Arduino Library

Control up to 8 DC motors through Wemos Motor Shield with Arduino.

This library is intended to replace the original library, lacking of good design and minor facilities like getter methods. Note that the original firmware has a major bug that blocks the entire I2C bus after few seconds of inactivity. This library mitigates such effect providing a method to force shield update, to avoid too long period of inactivity. Its up to the use to timely call this method. Even if this library works with original bugged firmware , I suggest an alternative firmware solving definitively this bug.

Features

  • Controls up 2 motor per shield
  • Control speed
  • Control direction
  • Short brake
  • Standby mode to save energy
  • Set PWM frequency

Usage

Instantiate the controller providing its i2c address:

MotorController motorController(0x30);

Initialize the I2C bus and the controller:

Wire.begin();
motorController.begin();

Turn on the motor:

Motor& motor = motorController.getFirst();
motor.setSpeed(100);

Stop the motor:

motor.setSpeed(0);

For a more comprehensive understanding, look at the examples or at the header files of the library.

Increase the maximum number of motors

The Wemos Motor Shield provides only 4 I2C selectable addresses, hence you can have only 4 Shield attached to the MCU. This leads to maximum 8 motors attached. You may use a I2C multiplexer to support more motors, or you can design your own shield supporting more I2C solder pads, or you can design a shield support more than just 2 motors, or you can use the module to support I2C selection through I2C itself (like new Lolin Motor Shield).

wemos-motor-shield-remake-arduino's People

Contributors

fabianoriccardi avatar

Watchers

 avatar

Forkers

mark078

wemos-motor-shield-remake-arduino's Issues

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.