Treehopper Python API
Welcome

This documentation contains all Python-specific information for interfacing with Treehopper. For hardware documentation, or for documentation for other languages, visit https://docs.treehopper.io/.

Features

Treehopper's Python API is designed to support many different execution contexts; you can integrate it into simple console applications that have 100% binary compatibility under Windows, macOS, Linux, and other UNIX-like operating systems. Treehopper's Java API also fully supports Android, allowing you to target smartphones and tablets.

Libraries

In addition to the main API that allows you to manipulate and sample pins on the Treehopper, the Java API also includes an ever-growing library full of drivers for many different peripheral ICs, including IMUs and other sensors; GPIO expanders, DACs and ADCs; LED drivers, character and graphical displays; and motor drivers, rotary encoders, and other motion devices.

Modules

Treehopper's Java API is split across the following packages:

  • io.treehopper: the base library. Provides GPIO, PWM, I2C, SPI, and base interface support. Requires one of these connectors:
    • io.treehopper.desktop: provides platform-agnostic connectivity for traditional console or desktop applications running on Windows, macOS, or Linux.
    • io.treehopper.android: provides connectivity for Android projects.
  • io.treehopper.libraries: provides support for more than 100 commonly-used ICs and peripherals.