Giter VIP home page Giter VIP logo

rbd_motor's People

Contributors

alextaujenis avatar per1234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rbd_motor's Issues

rbd-motor + sd-a2dp-player in one program

for an installation i need the ramp function and arduino-audtio-tools sd-a2dp-player in one sketch. if i do so, with player active, no ramp anymore possible. i need a slow ramp up over 5sec or more when the player starts, slow down when the player stops . something interferes there. how could i get to the core of the problem? where to look? i am not a real programmer...but experimentalist
yann

question

hello, i use the rbd lib to slowly ramp up and down the motor in an art installation..that all works very well...the motor start to spin for a time on a button pressed and then slows and stops.. the installation has sound as well. the sound shall also fade (ramp) in and out but faster than the motor. could i use and instance of this lib also for send a number to an external device, not pwm, to set its volume?
greets
yann

Motor controller with 1 PWM input, 1 direction pin

I'm using an H-bridge motor controller that has only 2 input pins: in1 is a PWM-capable Enable pin, and in2 is a High/Low Direction pin. How should I define the Motor Constructor so that forward() sets HIGH on the pin going to in2, and reverse() sets LOW on that same pin? (I don't have two separate direction pins on my controller)

Currently I'm just using motor.on() and manually setting the direction pin before I turn it on like the code below, but I was hoping there might be a way to better utilize the library.

// Arduino RBD Motor Library v2.1.2 Example - Spin a motor up and down with events.
// https://github.com/alextaujenis/RBD_Motor
// Copyright (c) 2015 Alex Taujenis - MIT License

#include <RBD_Timer.h> // https://github.com/alextaujenis/RBD_Timer
#include <RBD_Motor.h> // https://github.com/alextaujenis/RBD_Motor

RBD::Motor motor(6); // pwm pin
const int DCdirection = 7;

void setup() {
motor.rampUp(3000);
}

void loop() {
motor.update();

if(DCdirection == HIGH){
DCdirection = LOW;
}
else{
DCdirection = HIGH;
}

if(motor.onTargetSpeed()) {
if(motor.isOn()) {
motor.rampDown(300);
}
else {
motor.rampUp(300);
}
}
}

compatiblity with BTS7960 H-bridge

Thanks for creating and sharing your suite of libraries.

Is it possible to use this library to control an H-bridge that only has two pins? So instead of a PWM pin, and forward + reverse pins, only have two PWM pins. For example, if you wanted to move the motor forward, you would set the forward PWM pin to a non-zero value, and the reverse PWM pin to 0.

application note

http://www.infineon.com/dgdl/Infineon-BTS7960-DS-v01_01-en.pdf?folderId=db3a304412b407950112b408e8c90004&fileId=db3a304412b407950112b43945006d5d&ack=t

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.