Treehopper Java API


This documentation contains all Java-specific information for interfacing with Treehopper. For hardware documentation, or for documentation for other languages, visit


Treehopper's Java 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.


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.


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.
    • provides connectivity for Android projects.
  • io.treehopper.libraries: provides support for more than 100 commonly-used ICs and peripherals.