Suitcase Control Samples (Python)

The suitcase test hardware includes four stepper motors driven by an Arduino. There are several ways this can be driven:

  1. Using a standalone command-line Python script to send commands over USB to firmware on the Arduino. The suitcase_motion_demo.py example demonstrates this approach using the pySerial module to communicate with the Arduino running the StepperWinch firmware. This is the simplest strategy when starting from scratch, but requires debugging directly with the hardware.

  2. Using a standalone command-line Python script to translate MIDI events from a Akai MPD218 Drum Pad Controller to motion commands on the Arduino. This enables using a physical control device for performance control. The suitcase_midi_demo.py example demonstrates this approach using the python-rtmidi module to receive events and the pySerial module to communicate with the Arduino running the StepperWinch firmware. This is essentially a form of digital puppetry, although could be extended to a form of motion capture by using MIDI sequencing software to capture and replay performances.

  3. Using a command-line Python program which emulates the Webots API to connect an existing Webots simulation controller to the Arduino firmware. The suitcase_webots/ example demonstrates this approach. It can also be downloaded as suitcase_webots.zip. It requires pySerial installed in your Python 3 system (see Python 3 Installation).

  4. Using a graphical Python program written using PyQt5 to send commands to the Arduino firmware. This is considerably more involved since it requires some knowledge of GUI programming, but allow for custom performance control interfaces. No current example is provided, although this solution has been used in previous years and could be revived.

  5. Writing control code directly for the Arduino. This isn’t recommended, mostly because of the slow process of debugging on an embedded platform.