Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

ercius
Copy link

@ercius ercius commented Jul 25, 2020

Thanks for this excellent module. Im using it to automate control of a Maestro for electron microscopy. Its very useful.

I added a feature to simplify opening and closing the USB port. Then it never stays open by accident. This is called 'context' and implements the with statement in python.

An example using context support:

with maestro.Controller(ttyStr='COM4') as servo:
        position = 6532
        servo.setSpeed(1, 10)

The USB port is closed automatically at the end.

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.

1 participant