Questions tagged [pi4j]

Pi4J is a library for Java to use the GPIOs of the Raspberry Pi.

17 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
2answers
317 views

Pi4J kills USB bus?

Hello fellow Pi enthusiasts :) I am currently attempting to control a standard 16x2 character LCD display from the PI's GPIO pins from Java. I downloaded Pi4J and wrote a small program to initialize ...
3
votes
1answer
458 views

How to use PI4J with a brushless motor?

I have a Raspberry Pi 2 model B. I would like to be able to control a motor with a regulator and PI4J. I put the black cable to a ground pin and the PWM pin to pin 26. I've worked with servos before, ...
3
votes
0answers
2k views

Pi4J and Mifare RC-522 via SPI

I am having problems with coding a program that allows me to read RFID Tags with Pi4J on my Raspberry Pi 2 Model B. I am totally new to Python and would prefer a program written in Java to save some ...
2
votes
0answers
193 views

PI4J + Adafruit LCD with MCP23017

Got this device. Python example char_lcd_plate.py is working perfect. But I would like to manage it with Pi4J. I copied bits from python example LCD_PLATE_RS = 15 LCD_PLATE_RW ...
2
votes
1answer
3k views

RaspberryPi MOSI/MISO on java with PI4J

Sorry for my English, but I will try :) I need help with working with RFID reader RC522 (like this). I connected it to Pi with help of this manual, but I cant write right code on Java and Pi4J, which ...
1
vote
0answers
529 views

GPIO State Listener Example using Pi4J permanently triggers LOW-event

I have a Pi3 and I am trying out the example http://pi4j.com/example/listener.html which is a GPIO state listener. My issue is the following: When I press (close) the contact, I get one HIGH event. ...
1
vote
2answers
315 views

Pi4J ESC brushless motor is not running stable

I would like to control a brushless motor with a Java program running on a Raspberry Pi model b+. This is the code that I am using: package de.ye.boat_eng; import com.pi4j.wiringpi.Gpio; import com....
1
vote
0answers
280 views

Increase Performance of 4x4 LED Matrix (Multiplexing with pi4j)

I have coded a Display-Class to drive a X by Y LED-Multiplexing-Matrix with pi4j. However, I when driving a 4-by-4-Matrix I cannot get the framerate beyond roughly 30 fps, which still produces a ...
0
votes
1answer
98 views

Rpi4 - double HDMI functionality

What is the rational ( or what are the advantages ) of having a double HDMI port on the Raspberri Pi 4. Since the Pi is new, I did not find any info around and still did not tested myself- but What ...
0
votes
0answers
74 views

Pi4j Edge detection does not work (always detects both edges)

I am new to using Raspberry Pis GPIO and I am using pi4j to control it. I simply tried to make a Button work, that only triggers when releasing the button. Here is my code if (Gpio....
0
votes
0answers
24 views

BTS7960 pwm values

I have a BTS7960 h-bridge and I am trying to make a motor to move forward and backward using pwm values. I am using the pi4j library to control the pins. The pins L_EN and R_EN are initialized as ...
0
votes
0answers
30 views

How to do Maven build of Raspberry code on MacBook

While trying to do maven build on MacBook for Raspberry Pi 3 B+ board I am getting the following errors (I have written a simple program using pi4j library). The problem is while linking dynamic .so ...
0
votes
0answers
38 views

Raspberry Pi piface pi4j java

I am new to raspberry pi and am trying to use pi4j library to run one of the java samples of pi4j provided. When I issue gpio commandline on my pi, I am able to set the output high or low on the ...
0
votes
0answers
98 views

GPIO listener on Compute module 3 Pi4J

I am doing a project where I use a compute module 3 with Raspbian Jessi Lite, Java with the Pi4J lib version 1.2-SNAPSHOT. I'm trying to implement a GpioPinListenerDigital on the GPIO_23 like so: ...
0
votes
0answers
176 views

cannot play sounds on RPI3-B with java

im creating a java game library with support for raspberry, on that library I have a class that is in charge of sound effects, I created a game to test GPIO pins and sound was not working, I got an ...
0
votes
1answer
402 views

Pi4J | SPI | Gpio-Pin as Chip Select

I am using Pi4J to write programs on my Raspberry Pi. The Raspi is supposed to communicate with an Arduino Uno via SPI. It works pretty good, but there are only two SpiChannels so there are also only ...
-1
votes
1answer
228 views

How to restart the GPIO after shutdown() called

After I call the following Java code: gpio.shutdown() The GPIO turns off. How can I restart it? I need to restart it because of this problem. In the problem the light does not turn off with led.low(...