Closed benschw closed 9 years ago
Thanks for the PR. Please have a look at some of the review comments
Thanks for the PR @benschw. I'm thinking if this can be pulled out into a package which exposes something like
stepper, _ := embd.NewStepper(...)
thanks for all the feedback! I'll try to tackle the updates as soon as possible
I've incorporated your feedback, except the idea of creating a Stepper
struct. If you'd like me to try that, maybe getting this approved and creating a new PR pulling the Stepper abstraction out and refactoring the sample to use it would make review easier.
Let me know how to proceed.
Sounds about right
Sent from my iPhone
On 31-Mar-2015, at 5:47 am, Ben Schwartz notifications@github.com wrote:
I've incorporated your feedback, except the idea of creating a Stepper struct. If you'd like me to try that, maybe getting this approved and creating a new PR pulling the Stepper abstraction out and refactoring the sample to use it would make review easier.
Let me know how to proceed.
— Reply to this email directly or view it on GitHub.
sorry - so should I cancel this pr? or do you want to pull it before I get started on the Stepper struct?
No I am going to merge this. That should be a second PR
Sorry, I wasn't totally clear on the empty lines. Could you let me know line numbers if I got any wrong?
About the empty lines: I have left line comments whereever I noticed an issue
oops, I'm a little embarrassed about not running that before pushing.
also, I moved ticker.Stop up to a defer defined when i start the ticker; there is no Close
implemented on Ticker
Control a stepper motor (28BJY-48)
(this is a port of Matt Hawkins' example impl from http://www.raspberrypi-spy.co.uk/2012/07/stepper-motor-control-in-python/)
Datasheet: http://www.raspberrypi-spy.co.uk/wp-content/uploads/2012/07/Stepper-Motor-28BJY-48-Datasheet.pdf