A233843895-73894.png

Pi4J(外链网址已屏蔽)是专门用来控制树莓派GPIO口以及通信的Java库。它有如下功能:

Export & unexport GPIO pins

Configure GPIO pin direction

Configure GPIO pin edge detection

Control/write GPIO pin states

Pulse GPIO pin state

Read GPIO pin states

Listen for GPIO pin state changes (interrupt-based; not polling)

Automatically set GPIO states on program termination (GPIO shutdown)

Triggers for automation based on pin state changes

Send & receive data via RS232 serial communication

I2C Communication

SPI Communication

Extensible GPIO Provider interface to add GPIO capacity via expansion boards

Access system information and network information from the Raspberry Pi

Wrapper classes for direct access to WiringPi Library from Java

下载、新手帮助、API文档均可从官网找到。

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐