# Pi4J Project

**Java API for accessing GPIO, PWM, I2C, SPI, UART**

The Pi4J Project now includes support for BPI-M1 and BPI-M1+!

This support has just been added and only cursory tests performed, so lets call it experimental for now, but I welcome you guys to try it out and let me know if you run into any trouble. You must use the Pi4J v1.1-SNAPSHOT builds until v1.1 gets released. You can manually download the JARs in ZIP or the installable .DEB package from this page:

<http://pi4j.com/download.html>

Support includes Java programatic access and control of GPIO inputs/outputs, PWM, I2C, SPI, and UART (serial).

There is no documentation yet specifically for the Banana platforms, but apart from a few subtle differences in configuring a platform and pin/bus addressing, its basically the same. Perhaps better than documentation ... there are a number of examples (sample code) included in the build and available in the GitHub repo specific to each Banana platform:

BananaPi Examples:

<https://github.com/Pi4J/pi4j/tree/develop/pi4j-example/src/main/java/bananapi>

BananaPro (BPI-M1+) Examples

<https://github.com/Pi4J/pi4j/tree/develop/pi4j-example/src/main/java/bananapro>

Other notes: You don't have to install and compile WiringPi/WiringBP seperately! The Pi4J core JAR includes all the native libraries it needs to communicate with the hardware embeded in the JAR.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bananapi.gitbook.io/bpi-m1/en/pi4j_project.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
