Comments (9)
pom.xml
<dependency>
<groupId>com.diozero</groupId>
<artifactId>diozero-provider-pi4j</artifactId>
<version>0.10</version>
</dependency>
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-core</artifactId>
<version>1.1</version>
</dependency>
Using PI4J direct API it's working ...
Using this, I cause a strange file system error (remount in ready-only):
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-core</artifactId>
<version>1.2-SNAPSHOT</version>
</dependency>
from diozero.
I believe this is a problem with pi4j itself relating to it containing a C library this is statically linked to an old version of wiringPi. There is a command line option to force it to use the dynamically linked version (Google should be able to tell you the exact command line option).
Let me know how you get on with that.
I've not yet tried pi4j 1.2-SNAPSHOT.
If you are using diozero I would recommend using the built-in provider (only include to diozero-core and tinylog). Is there a reason you need to use the pi4j provider?
Matt
from diozero.
I was trying to use the RFID reader. I thought it would work only using a pi4j provider. After your comment I used built-in provider and it worked
I tested using the pi4j API directly (1.2-SNAPSHOT) and it works correctly. When I use pi4j provider + pi4j 1.2-SNAPSHOT, a strange file system error occurs and hangs the raspberry
I was in doubt of which is the advantage of pi4j provider ?
from diozero.
PS: Actually the problem is in the pi4j, I tried to use a PWM function and the same error happened.
from diozero.
Great. Pi4j support in diozero largely historic; the portability of the library is based on the pluggable providers. Support via pi4j was easy and added before I developed my own portable provider that will work on any device. If you require high performance GPIO control on the Pi you would need to use pigpio or my own memory mapped implementation.
If I get a moment I will look into the pi4j problem myself. Did you find the command line flag to force loading the dynamic pi4j / wiringPi library?
from diozero.
"Unable to determine hardware version. I see: Hardware : BCM2835", this has been solved using 1.2-SNAPSHOT, no need flag (-Dpi4j.linking=dynamic).
I got another error: Pi4J/pi4j-v1#319 (comment)
But i'll try (PWM / SPI) as root ... when I'm home
from diozero.
Do you have a reason for using pi4j? You might want to try the pigpio provider, I've found it to be quite reliable and has excellent PWM support (not just on the Pi's hardware PWM pins). It does, however, also require you to run as root.
from diozero.
Do you have a reason for using pi4j?
I believe it is the best known, and would have better support
thanks for assist
I'm planning on integrating your library as the basis of my framework when it comes to SBC
http://opendevice.io
from diozero.
Great, let me know how you get on.
from diozero.
Related Issues (20)
- Refactor StepperMotors for broader usage HOT 2
- Probable bug in new StepperMotor setups HOT 3
- How to realize infrared reception HOT 1
- RockPi 4a. Problems with specific gpio pin HOT 1
- WS2811 Led doesn't work on Tinker board R2.0 HOT 1
- WS2811 in tinkerboard HOT 5
- SSDOled won't work for I2C channel HOT 5
- I2C devices are not thread-safe HOT 7
- Using pigpio without root HOT 1
- closing serial port causes close eventloop and shutdown HOT 1
- Enhancement request/offer: SN3218 HOT 1
- Enhancement Request: active braking for PwmMotor HOT 1
- PCA9685 has troubles with certain servo angles HOT 5
- BUG: Updates to board info causing errors/messages HOT 5
- SsdOled "display" methods are confusing
- Add board info support for Raspberry Pi 5 HOT 3
- MockFactory throws warning exceptions when run on non-supported systems (non-critical)
- Emhancement: Make I2C devices "shareable" HOT 1
- Can't close and re-open MFRC522 HOT 3
- Support IRQ triggering for more efficient MFRC22 tag reading HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diozero.