-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running Problem #6
Comments
Are you starting your application with |
Hi, Thanks for your quick response, |
just to be sure, can you build it in netbeans (as jar) and start that one with |
now the problem is different
I have pigpio "pigpio (1.79-1+rpt1)" |
what dependencies do you have in your project? |
Hi, Im just gonna use Gpio Output pins for relay control. |
package pintest;
/**
*
* @author pi
*/
import com.pi4j.Pi4J;
import com.pi4j.io.gpio.digital.DigitalInput;
import com.pi4j.io.gpio.digital.DigitalOutput;
import com.pi4j.io.gpio.digital.DigitalState;
import com.pi4j.io.gpio.digital.PullResistance;
import com.pi4j.util.Console;
public class Pintest {
/**
* @param args the command line arguments
*/
private static final int PIN_LED = 22; // PIN 15 = BCM 22
public static void main(String[] args) throws InterruptedException {
// TODO code application logic here
var pi4j = Pi4J.newAutoContext();
var ledConfig = DigitalOutput.newConfigBuilder(pi4j)
.id("led")
.name("LED Flasher")
.address(PIN_LED)
.shutdown(DigitalState.LOW)
.initial(DigitalState.LOW)
.provider("pigpio-digital-output");
var led = pi4j.create(ledConfig);
led.high();
Thread.sleep(1000);
led.low();
}
} Thats the code |
And you have these dependencies included?
|
SOrry for that question but where i have to add these dependencys ? |
Are you using Maven or Gradle? See |
Im using Gradle |
Please take a look at this example: |
Hi, Im new at pi4j v2, Im using pi 4b and netbeans when i try to compile always get same problem,
[AWT-EventQueue-0] INFO com.pi4j.Pi4J - New auto context [AWT-EventQueue-0] INFO com.pi4j.Pi4J - New context builder [AWT-EventQueue-0] INFO com.pi4j.platform.impl.DefaultRuntimePlatforms - adding platform to managed platform map [id=raspberrypi; name=RaspberryPi Platform; priority=5; class=com.pi4j.plugin.raspberrypi.platform.RaspberryPiPlatform] [AWT-EventQueue-0] ERROR com.pi4j.library.pigpio.util.NativeLibraryLoader - Unable to load [libpi4j-pigpio.so] using path: [/lib/armhf/libpi4j-pigpio.so] java.lang.UnsatisfiedLinkError: /tmp/libpi4j-pigpio5652675114124001500.so: libpigpio.so.1: cannot open shared object file: No such file or directory
is there solution to fix it ?
Thank you
The text was updated successfully, but these errors were encountered: