Skip to content

Getting started

Terminal window
pip install pyeilik

The distribution is pyeilik; the import is eilik, the way pyserial imports as serial. The Py prefix belongs to the name you type into pip, not to the one you type into your code.

One wheel covers Apple silicon and Intel, on any Python 3.9 or newer. What it carries is a plain shared library rather than a CPython extension, so it is not tied to an interpreter version.

Showing pictures needs a decoder, which Python has none of built in:

Terminal window
pip install 'pyeilik[image]'

The robot runs at 125000 baud, which is not a standard rate. Setting it needs an Apple-specific ioctl and there is no equivalent elsewhere. On another platform the port would open at some default rate and put garbage on the wire, which is worse than refusing outright.

import eilik
with eilik.connect() as robot:
robot.arm_left.to(1800)
robot.head.to(1600)
robot.commit() # both joints move together, in one packet
print(robot.positions())
robot.rest()

Sides are the robot’s own, the way anatomy is normally named. arm_left is the robot’s left arm, which is the one you see on your right when facing it. So arm_left.to(1800) raises the arm on your right.

Joint Range Centre
arm_left, arm_right 1150–1850 1500
body 1350–1650 1500
head 1300–1700 1500

Values outside a joint’s range are clamped rather than sent.