Hi all!
I am currently working on Poppy Torso and I would like to switch the LED of a dynamixel on by using pypot. I have tried directly with the “pydynamixel” package, but the port of the motors is already used by pypot thus it doesn’t work very well.
I have found a topic about Dynamixel 320 led management using Pypot, but I didn’t find the same topic for the dynamixels of a Poppy torso.
You can access to status led on pypot only by low level with switch_led_on and switch_led_off methods.
from pypot.dynamixel import DxlIO
dxl = DxlIO('/dev/ttyACM0')
# Switch on led of motor with id 13
dxl.switch_led_on({13})
# Switch on led of every detected motors with id < 60
motors = dxl.scan(range(60))
dxl.switch_led_on({id for id in motors})
Yes, you cannot access multiple time at the same serial port. The code snippet above can only be done from the io level, not from the robot level ; you can access to the io level from the robot but it’s hided.
However, the led_status can be added to the motor level. Feel free to make a pull request to add this functionality.