Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BenMens/asyncgcodecli

Open more actions menu

Repository files navigation

Async gcode client

This is a async client library to control gcode severs. Currently only UArm Swift Pro is supported. This library uses asyncio.

Development

In VSCode create a new venv using Python: Create environment and use requirements.txt as dependencies.

Installation

pip3 install pyserial

pip3 install https://github.com/BenMens/asyncgcodecli/releases/latest/download/asyncgcodecli-1.0.0-py3-none-any.whl  

Update to latest version

pip3 install --upgrade https://github.com/BenMens/asyncgcodecli/releases/latest/download/asyncgcodecli-1.0.0-py3-none-any.whl  

Documentation

online documentation

Example

"""Example"""

from asyncgcodecli import UArm


async def move_script(uarm: UArm):
    """Script that moves the robot arm."""
    # set de robot arm mode to 0 (pomp)
    uarm.set_mode(0)

    uarm.move(150, 0, 150, 200)

    for _ in range(1, 5):
        uarm.set_buzzer(2000, 500)
        uarm.set_buzzer(5000, 500)

    # make a nice landing
    uarm.move(150, 0, 20, 200)
    await uarm.sleep(1)
    uarm.move(150, 0, 0, 10)

# Execute move_script on the UArm that is
# connected to /dev/cu.usbmodem14101
UArm.execute_on_robotarm('/dev/cu.usbmodem14101', move_script)

About

A gcode client in python using asyncio

Resources

License

Stars

Watchers

Forks

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.