elephantrobotics / pymycobot

This is a python API for ElephantRobotics product.
MIT License
107 stars 54 forks source link

mc.get_coords() returns None #66

Open y-z-g opened 1 month ago

y-z-g commented 1 month ago

Describe the bug Following the myCobot 280 M5 demo code, got error.

To Reproduce Steps to reproduce the behavior:

  1. pip install pymycobot --upgrade
  2. copy paste demo/myCobot_280_demo/280_draw_gcode.py and modify the usb port for linux use
  3. run demo script

Expected behavior demo code should work but mc.get_coords() returns None.

Env (please complete the following information): ubuntu, python3.11 venv

lalado-o commented 1 month ago

Did you select Transponder > USB UART > OK before running the demo script? The robot needs to establish a connection before it can be programmed

y-z-g commented 1 month ago

Select menu: miniRoboFlow v2.30 -> Transponder -> USB UART

Showing: Connect test Atom: OK

anla-xu commented 4 weeks ago

You can write a simple test script like this to see if there is any output。

from pymycobot import MyCobot
import time
m = MyCobot("com5")

for _ in range(10):
    print(m.get_angles())
    time.sleep(0.1)
    print(m.get_coords())
    time.sleep(0.1)