Python is a popular programming language, written on C. Its syntax allows programmers to write in fewer lines of code, and is easy for new programmers to learn.

This Python library is brought to you by the efforts of Jay Jin, Justas Sadzevicius, and others.

Download & Install

1.Download and install Python. Python 2.7+ and Python 3.3+ are supported:

For Mac or Linux, download the most recent, stable version of 64-bit Python.

For Windows, install 32-bit Python from this page (even if you have a 64-bit version of Windows).

2. Download and unzip our Finch Python library.


You will need to install libusb-1.0. To do so, run sudo apt-get install libusb-1.0-0-dev in any terminal window.


Documentation for the Python API is available at Python API Documentation.

After you have downloaded the Finch Python package, follow the instructions for compiling and running programs.

Important Files and Folders

The following files and folders are common to all Python downloads: – The Finch API source file. – Used by for sending/receiving data over USB

hidapi32/64.dll (Windows), libhidapi.dylib (Mac), libhidapi32/ (Linux) – Contains the HIDAPI library.

Various example programs written:

  • – Plays from a list of three songs
  • – Drives around in a square
  • – Moves the robot forwards until an obstacle is detected, then backwards
  • – Beeps until Finch is placed on its tail
  • – Tests all Finch sensors and outputs

Finch Python API Description.pdf – A local copy of the Finch API documentation

Version Information

Version 1.10 of the Finch Python package is now available and has been successfully tested on Windows XP 32-bit, Windows 7/8 64-bit, Mac OS 10.6, and Ubuntu 12.04 with Python 3.3.1 and Python 2.7.5.

Known Issues and Troubleshooting

We only support 64-bit Python for Mac.

We only support 32-bit Python for Windows, but you can use the library on 64-bit versions of Windows so long as you install a 32-bit version of Python.

Issue: You run a correctly compiled program and it hangs after “Connecting to Finch”.  The LED stays in color fading mode.

Possible Causes:

  • The Finch is already connected to another program. For example, if the Finch is connected to the Birdbrain Robot Server, Python will not be able to connect to it.
  • On a Mac, you must search for the libhidapi64.dylib and libhidapi32.dylib libraries and copy them into the Mac’s /usr/local/lib directory. To find this directory, select Go/Go to Folder in the Finder. If the directory does not exist, you can create it in Terminal with the following command: sudo mkdir /usr/local/lib
  • The computer went to sleep when the Finch was plugged in and did not properly register Finch upon wakeup. Unplugging the Finch and plugging it back in will solve the issue.