Giter VIP home page Giter VIP logo

micropython-stepper's People

Contributors

redoxcode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

micropython-stepper's Issues

Can't use 2 steppers at the same time

Hi,
It is said in your read me that this lib allows the user to command several steppers in a non blocking way.
I understand here that 2 steppers can be driven independantly at the same time.

I tried a simple wiring, with 2 stepper using 2 TMC2209drivers. with the code under this issue. I tried to disconnect motors 1 after the other to test it alone and everything is going well, it does 180° in one direction then comes back to 0°. But when I plug both motors, only one is moving.
The non moving stepper is plugged to a driver that seems to have a default (high urrent consumption when the motor isn't enabled). However, this particular driver is moving when I command it alone.

Do you have an idea of what would cause this behavior ?

thanks,
Sylvain

My program :

from stepper import Stepper
import time
from machine import Pin

Pin(5, Pin.OUT).off()
Pin(21, Pin.OUT).off()


s1 = Stepper(18,19,steps_per_rev=200*8, speed_sps=500, en_pin=21, timer_id=-1)
s2 = Stepper(22,23,steps_per_rev=200*8, speed_sps=500, en_pin=5, timer_id=-1)

s1.target_deg(0)
s2.target_deg(0)
print(1)
time.sleep(3.0)
s1.target_deg(180)
s2.target_deg(180)
time.sleep(3.0)
print(2)
s1.target_deg(0)
s2.target_deg(0)

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.