Trouble with I2C
See original GitHub issueHi,
I try to get a stripped-down version of the example for I2C from the PI4J site (https://pi4j.com/documentation/io-examples/i2c/) running.
The main method starts with the following statements:
Context pi4j = Pi4J.newAutoContext();
I2CProvider i2CProvider = pi4j.provider("linuxfs-i2c");
Unfortunately I get teh following exception when trying to get the I2CProvider:
Exception in thread "main" com.pi4j.provider.exception.ProviderNotFoundException: Pi4J provider [linuxfs-i2c] could not be found. Please include this 'provider' JAR in the classpath.
at com.pi4j@2.0-SNAPSHOT/com.pi4j.provider.impl.DefaultRuntimeProviders.get(DefaultRuntimeProviders.java:238)
at com.pi4j@2.0-SNAPSHOT/com.pi4j.provider.impl.DefaultProviders.get(DefaultProviders.java:147)
at com.pi4j@2.0-SNAPSHOT/com.pi4j.context.Context.provider(Context.java:240)
at de.rziegaus.ATECC608A@1.00/de.rziegaus.SimpleATECC608A.main(SimpleATECC608A.java:18)
So I added the dependency for linuxfs-i2c, but now I get a different problem with the program. Now I get an exception saying
Error occurred during initialization of boot layer
java.lang.LayerInstantiationException: Package lib.armhf in both module com.pi4j.library.pigpio and module com.pi4j.library.linuxfs
If I remove the jar files concerning pigpio (library and plugin) manually everything works fine - at least I don’t get any errors when I run the stripped-down version of the program.
What concerns me a bit - do I really have to choose between either pigpio and linuxfs-i2c? Or is there a workaround?
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Common Problems In Systems - I2C-Bus.org
Often, problems in I2C bus systems have a simple cause and can easily be verified by checking with simple equipment. Is there a...
Read more >Troubleshooting I2C - Texas Instruments
This application report describes the I2C protocol and provides guidelines on debugging a missing acknowledgment, selecting the pullup resistors, or meeting the ...
Read more >common problems and errors with using I2C - What every ...
A problem arises though when both masters are trying to read from the same slave device. When this happens it is possible that...
Read more >What Could Go Wrong? I2C Edition - Hackaday
Although I2C does reduce the number of signal wires you need, it gets dangerous when you have more than a handful of devices...
Read more >Problem with I2C
It works well, but I need to do communication errorless - between i2c slave and i2c master is cable - about 30cm. There...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, the problem is resolved. I have downloaded the latest snapshot and now it works.
Thanks for your help,
Rudi
Ahh, good to know! I was hoping to find some time this weekend to test it out again. But now not necessarily.
On Fri, Aug 6, 2021, 17:03 rz259 @.***> wrote: