Skip to content
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

grbl support #73

Open
mo-nonym opened this issue Feb 9, 2021 · 0 comments
Open

grbl support #73

mo-nonym opened this issue Feb 9, 2021 · 0 comments

Comments

@mo-nonym
Copy link

mo-nonym commented Feb 9, 2021

The Printer class works with a printer running on a Marlin firmware (I guess). How can support for the grbl be added ?

A tryout of the following code

import mecode

g = mecode.G(
    direct_write=True,
    direct_write_mode="serial",
    printer_port="/dev/ttyACM0",
    baudrate=115200
)
g.write("$H")
g.move(x=10, y=10)
g.teardown()

...returns G91 ;relative in the terminal before freezing.

KeyboardInterrupt returns this:

^CTraceback (most recent call last):
  File "move.py", line 7, in <module>
    baudrate=115200
  File "/home/me/.local/miniconda3/envs/mecode_env/lib/python3.7/site-packages/mecode/main.py", line 238, in __init__
    self.setup()
  File "/home/me/.local/miniconda3/envs/mecode_env/lib/python3.7/site-packages/mecode/main.py", line 337, in setup
    self.write('G91 {}relative'.format(self.comment_char))
  File "/home/me/.local/miniconda3/envs/mecode_env/lib/python3.7/site-packages/mecode/main.py", line 981, in write
    self._p.connect()
  File "/home/me/.local/miniconda3/envs/mecode_env/lib/python3.7/site-packages/mecode/printer.py", line 151, in connect
    sleep(0.01)  # wait until the start message is recieved.
KeyboardInterrupt

Thx for hints and help !

P.S. This script from the grbl repo could maybe hold the solution.

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

No branches or pull requests

1 participant