Skip to content

Update motorkit_stepper_simpletest.py #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 6, 2020
Merged

Update motorkit_stepper_simpletest.py #19

merged 2 commits into from
Jan 6, 2020

Conversation

ladyada
Copy link
Member

@ladyada ladyada commented Jul 26, 2019

add delay

@caternuson
Copy link
Contributor

I think examples/motorkit_stepper_test.py also needs this patch? It has the same loops.

How about making the delay a const like thing? That way it can be tweaked as needed easily. Esp. since there are multiple loops in examples/motorkit_stepper_test.py.

STEP_DELAY = 0.01

for i in range(100):
    kit.stepper1.onestep()
    time.sleep(STEP_DELAY)

@ladyada
Copy link
Member Author

ladyada commented Jul 29, 2019

yeah i didnt get to work on the test/code this weekend, but all the examples that have a stepper should have a STEP_DELAY!

@caternuson
Copy link
Contributor

Oh yeah, there's also examples/motorkit_dual_stepper_test.py which is multi-threaded. I think time.sleep() is OK there? It blocks thread, not process.

@ladyada
Copy link
Member Author

ladyada commented Jul 29, 2019

yeah i think its fine to have there too, that one is mimic'd from the original Python library

@caternuson
Copy link
Contributor

Hmm. Maybe time.sleep is too crude?
https://forums.adafruit.com/viewtopic.php?f=31&t=154221&start=15#p762855

@ladyada
Copy link
Member Author

ladyada commented Jul 30, 2019

we used sleep in the previous library
https://github.com/adafruit/Adafruit-Motor-HAT-Python-Library/blob/master/Adafruit_MotorHAT/Adafruit_MotorHAT_Motors.py#L159

@caternuson caternuson requested a review from a team November 26, 2019 15:52
@caternuson
Copy link
Contributor

Just trying to make sure / remember - this PR was for #18, right?

@ladyada
Copy link
Member Author

ladyada commented Nov 26, 2019

yah i htink so!

@dhalbert
Copy link
Contributor

dhalbert commented Jan 6, 2020

@caternuson This has been hanging for a while. Any reason not to approve this?

@ladyada ladyada merged commit bc7641c into master Jan 6, 2020
@dhalbert dhalbert deleted the ladyada-patch-1 branch January 6, 2020 17:21
@caternuson
Copy link
Contributor

@dhalbert not that i can remember. if there is anything, can just reopen.

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jan 7, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display to 3.8.1 from 3.8.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#56 from makermelissa/master
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#55 from philippkeller/master
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#53 from adafruit/dherrada-patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT to 1.1.6 from 1.1.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#19 from jerryneedell/jerryn_clientid
  > disabling pypi deploy via actions
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#17 from adafruit/dherrada-patch-1
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#13 from adafruit/dherrada-patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_MotorKit to 1.3.2 from 1.3.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_MotorKit#19 from adafruit/ladyada-patch-1
  > Merge pull request adafruit/Adafruit_CircuitPython_MotorKit#22 from adafruit/dherrada-patch-1
  > Merge pull request adafruit/Adafruit_CircuitPython_MotorKit#21 from adafruit/dherrada-patch-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants