Questions tagged [pi4j]

Pi4J intended to provide a friendly object-oriented I/O API and implementation libraries for Java Programmers to access the full I/O capabilities of the Raspberry Pi platform. This project abstracts the low-level native integration and interrupt monitoring to enable Java programmers to focus on implementing their application business logic.

59 questions
1
vote
2 answers

PI4j Raspberry Pi Infrared receiver

I have connected a Infrared receiver to Rasberry Pi like this: And i have tried the example from URL: http://pi4j.com/example/listener.html to get information from the GPIO 18 but it outputs nothing into terminal. Is there any way i can get info…
Vuk Vasić
  • 1,398
  • 10
  • 27
0
votes
0 answers

How to read from I2C on RPi using Java Pi4J

I'm trying to read value from register on my device using I2C protocol on RPi CM4. All is connected and workign fine using i2cget/i2cset on shell level. But when I try to access to register of my device by Pi4J, I always get 0 value and…
Son
  • 960
  • 2
  • 14
  • 25
0
votes
0 answers

Raspberry Python & Java - No input MISO

At the moment I am running a python script to get the temperature from a PT1000 sensor via MAX31865 with my Raspberry Pi 3B+. With the python code everything works fine: #!/usr/bin/python import time, math import RPi.GPIO as GPIO class Max31865(): …
Lukas
  • 1
  • 5
0
votes
0 answers

Example from the library Pi4j doesn't work properly

I have created a Java-project using Pi4j and LibGDX. I have integrated the simple example from the official homepage of the Pi4j project in my project. I have changed only the number of the LEDs from 4 to 10 and tested the program with a LED strip…
0
votes
0 answers

Why LED-strip on chip ws2811 never switch on the first LED?

I use Pi4J library to control a LED-strip. The LED-strip contains 10 LEDs with chips ws2811. They are connected serially. I have found a simple example on github that I use on a Raspberry Pi 3B (Raspberry Pi OS 32 bit). My code set some LEDs on…
0
votes
0 answers

LED strip on chip ws2811 doesn't work correct on Raspberry Pi 3b using Pi4j

I use Pi4j on a Raspberry Pi to control a LED strip. It is made on chip ws2811. I have rewrote the example from the official homepage to have the ability to switch on some LEDs. The color is only white. I set the values of the first LED (parameter1)…
0
votes
0 answers

Raspberry Pi controls a LED strip based on ws2811 chips from C

I must create a java videogame that runs on a Raspberry Pi 3b and controls external devices. The game is ready. It communicates successfully with a joystick, coin acceptor and 7-segments LED-display. But I can not control a LED-strip. It is the…
0
votes
1 answer

Addressable LED-strip control using Raspberry Pi 3B and Pi4J library

I'm creating an arcade cabinet for one firm. In this project I use Pi4j library for GPIO-interaction. I use examples from the official repo to control a LED-strip. The LED-Strip contains 10 LED's. I wrote a code that reads from the console two…
0
votes
0 answers

Can not launch examples of the Pi4J from the Intellij IDEA on Raspberry Pi 4B

I need to create a project for the RPI3. It must control external devices, read signals from a coin acceptor and output the graphic of a videogame to a screen 1920x1080 px. I used Processing libraries (www.processing.org) for all the purposes but it…
0
votes
0 answers

pigpio initialisation failed on raspi in qemu in docker

I'm developing a program for Raspberry Pi in Java which works fine on a Raspi. Now I want to add functionality, that is not directly related to GPIO. And I don't want to carry around the Raspi with my development notebook. My idea: pull the…
fbstov
  • 1
  • 1
0
votes
1 answer

raspberry pi java servo controll

I am java developer and pi4j begginer. I am developing java app that can control servo (raspberry pi 4 model b) the error: Exception in thread "main" java.lang.NoClassDefFoundError: com/pi4j/wiringpi/Gpio at…
0
votes
0 answers

Running Pi4J inside docker container on RaspberryPi

I try to run Pi4J Library inside a docker container on RaspberryPi Host. When the app is running on RaspberryPi Host, everything is working fine. But when its run inside a docker container, the Pi4J native library cant be loaded. pom …
wutoso
  • 46
  • 5
0
votes
0 answers

Raspberry pi throws UnsatisfiedLinkError when experimenting with Pi4J

I am a Minecraft server admin trying to get a discord bot running that turns the Minecraft server on. I would like to run the bot on my Raspberry Pi and run it using Java. However, my GPIO library doesn't really work, throwing UnsatisfiedLinkErrors…
Irsu85
  • 125
  • 1
  • 7
0
votes
0 answers

Turn on LED using pi4j and Raspberry pi 4

I am so new to Raspberry Pi. I want to use pi4j 2 to flash a led that is connected to a raspberry pi. This is my code but the led does not turn on at all: import com.pi4j.Pi4J; import com.pi4j.io.gpio.digital.DigitalOutput; import…
rezza72
  • 127
  • 1
  • 11
0
votes
1 answer

Pi4J Classpath Error - Intellij running remotely on Pi Zero W

PROBLEM SUMMARY I am getting a class path error when I try to code on my desktop and deploy it remotely to my Pi Zero W. BACKGROUND The Pi4J v2.0enter link description here library provides a Maven Archetype to help with Development and instructions…
Radika Moonesinghe
  • 361
  • 2
  • 6
  • 17