Go to advanced search

by savageautomate
Fri Jan 29, 2021 12:52 pm
Forum: Java
Topic: GPIO Digital input modes not working RPI4B !
Replies: 1
Views: 707

Re: GPIO Digital input modes not working RPI4B !

Pi4J v1.3 with *unofficial* WiringPi v2.60 installed should work for all GPIO inputs/outputs on RPi 4B/400/CM4.
Please see: https://pi4j.com/1.3/dependency.html. for details on installing this newer WiringPi version.

Thanks, Robert
by savageautomate
Fri Jan 29, 2021 12:48 pm
Forum: Java
Topic: Pi400 GPIO wiringPi
Replies: 4
Views: 1327

Re: Pi400 GPIO wiringPi

Pi4J v2.0 is moving away from WiringPi. (https://v2.pi4j.com/what-is-new). Its still very much a work in progress.
Pi4J v1.3 and v1.4-SNAPSHOT both support RPi 4B, 400, CM4 using the updated *unofficial* wiringPi sources.
See: https://pi4j.com/1.3/dependency.html

Thanks, Robert
by savageautomate
Wed Jul 15, 2020 2:32 pm
Forum: Java
Topic: Error during i2C operation : java.lang.ClassNotFoundException: sun.misc.SharedSecrets
Replies: 8
Views: 4317

Re: Error during i2C operation : java.lang.ClassNotFoundException: sun.misc.SharedSecrets

The Pi4J project is not dead. It was in a coma for several months, but we are now actively working to get some new releases out. A lot of effort is currently going into Pi4J V2 which is a complete re-write and will now be based on the PiGPIO library instead of the now deprecated WiringPi. V2 is sti...
by savageautomate
Wed Jul 15, 2020 2:28 pm
Forum: Java
Topic: PI4J pin.low() no longer working on RBPi 3B+
Replies: 6
Views: 1799

Re: PI4J pin.low() no longer working on RBPi 3B+

I think you'll have to assume that Pi4J has been abandoned. It's not been updated since August 2019. It doesn't appear to have any support for RPi4B. It's using the deprecated WiringPi library. It's as dead as a proverbial Norwegian Blue parrot from a petshop in Bolton (or Ipswich). Development on ...
by savageautomate
Wed Jul 15, 2020 2:20 pm
Forum: Java
Topic: PI4J GpioPinDigitalOutput.high(), low() and toggle() not working anymore on Pi 4
Replies: 10
Views: 3630

Re: PI4J GpioPinDigitalOutput.high(), low() and toggle() not working anymore on Pi 4

You do need to install the latest WiringPi to get RPi 4B working with Pi4J. Pi4J v1.2 is dynamically linked against WiringPi. So updates to WiringPi on your system will get used by Pi4J. We are actively working on a Pi4J 1.3, 1.4 and 2.0 release. v1.3 will just be to verify and document RPI4B suppor...
by savageautomate
Sun Aug 06, 2017 6:18 pm
Forum: Java
Topic: Background task, Async?
Replies: 3
Views: 2999

Re: Background task, Async?

I think you have already solved this for your needs but here is another option using Pi4J: This example shows how to configure a GPIO pin to blink as a background task. https://github.com/Pi4J/pi4j/blob/master/pi4j-example/src/main/java/BlinkGpioExample.java Technically speaking its running in a wor...
by savageautomate
Sat Aug 05, 2017 3:14 pm
Forum: Off topic discussion
Topic: RPi Server
Replies: 6
Views: 2446

Re: RPi Server

Another couple of services that I have looked at (but not personally used) are: SensorCloud (http://www.sensorcloud.com) OpenSensorCloud (http://opensensorcloud.com/) ThingSpeak (https://thingspeak.com/) Adafruit.IO (https://io.adafruit.com/) Xively(https://www.xively.com) and so many more.
by savageautomate
Sat Aug 05, 2017 3:07 pm
Forum: Off topic discussion
Topic: RPi Server
Replies: 6
Views: 2446

Re: RPi Server

Do you need to record historical values or do you just need immediate values? MQTT is my pick for communicating sensor data to "The Cloud". There are free (public) MQTT services available. (Just one example: http://www.mqtt-dashboard.com/) There are Java and Android (as well as just about ...
by savageautomate
Sat Aug 05, 2017 2:47 pm
Forum: AIY Projects
Topic: audio doesnt work at all
Replies: 15
Views: 15987

Re: audio doesnt work at all

FWIW ... you should be able to run your code using the Pi4J libraries on kernel 4.8 and later using Pi4J 1.2-SNAPSHOT builds.
See this thread for more details:
https://github.com/Pi4J/pi4j/issues/349

Thanks, Robert
by savageautomate
Sat Aug 05, 2017 2:45 pm
Forum: Camera board
Topic: Kernel/scheduler affecting "raspivid" behaviour?
Replies: 2
Views: 1185

Re: Kernel/scheduler affecting "raspivid" behaviour?

FYI ... you should be able to run your code using the Pi4J libraries on kernel 4.8 and later using Pi4J 1.2-SNAPSHOT builds.
See this thread for more details:
https://github.com/Pi4J/pi4j/issues/349

Thanks, Robert
by savageautomate
Sat Aug 05, 2017 2:42 pm
Forum: General discussion
Topic: Pi4J - Download package JAR wiringPi
Replies: 1
Views: 1215

Re: Pi4J - Download package JAR wiringPi

@narraccino, 1.) Pi4J JARs are available in the Maven Central repository for all release versions: http://repo1.maven.org/maven2/com/pi4j/ 2.) Pi4J JARs are available in the Sonatype OSS repository for all release versions as well as all SNAPSHOT builds : https://oss.sonatype.org/content/groups/publ...
by savageautomate
Fri Aug 04, 2017 3:42 pm
Forum: Troubleshooting
Topic: "Unable to determine hardware version"
Replies: 31
Views: 44942

Re: "Unable to determine hardware version"

http://pi4j.com/images/logos/pi4j-header.png For clarification ..... FWIW . . Pi4J does not implement any hardware/kernel version checking routines in its own code. ( at least none that I remember ) The error you are seeing is an error message output by the WiringPi library due to a change in the h...
by savageautomate
Wed Jul 27, 2016 7:34 pm
Forum: Beginners
Topic: Installing pi4j on Rasp pi 3
Replies: 4
Views: 4088

Re: Installing pi4j on Rasp pi 3

If the Pi4J JAR's are not already included in your Java programs classpath you can optionally include a " -classpath " argument to the "java" command line to tell Java to include the classpath for the Pi4J classes. sudo java -classpath .:classes:/opt/pi4j/lib/'*' testeEnvio.Inter...
by savageautomate
Wed Jul 27, 2016 7:22 pm
Forum: Java
Topic: Pi4J Version 1.1 is Released!
Replies: 3
Views: 3326

Pi4J Version 1.1 is Released!

http://pi4j.com/images/logos/pi4j-header.png PI4J VERSION 1.1 RELEASE The long overdue release of version 1.1 is finally here! http://www.savagehomeautomation.com/pi4j-1.1 It's been just over a year since the 1.0 release and there have been about 415 new commits to the 1.1 release which include man...
by savageautomate
Mon Jun 13, 2016 9:20 pm
Forum: Java
Topic: MCP3424 pi4j
Replies: 7
Views: 3999

Re: MCP3424 pi4j

FYI, contributor "Alexander Falkenstern" recently added a MCP3424 impl to the Pi4 project. SEE: https://github.com/Pi4J/pi4j/commit/2c059a618230abe4cb56884da237a4bcd976b069 Examples: https://github.com/Pi4J/pi4j/blob/develop/pi4j-example/src/main/java/MCP3424GpioExample.java https://github...
by savageautomate
Fri Jun 03, 2016 4:18 pm
Forum: Java
Topic: MCP3424 pi4j
Replies: 7
Views: 3999

Re: MCP3424 pi4j

There are a couple of MCP ADC chips implemented in the Pi4J-gpio-extension project including MCP 3004, 3008, 3204, 3208. I think these are SPI chips, but it may still provide a useful pattern especially if you ultimately want to contribute the MCP3424 back into the Pi4J project. https://github.com/P...
by savageautomate
Fri Dec 18, 2015 4:31 pm
Forum: Java
Topic: Really basic concept question...
Replies: 7
Views: 2420

Re: Really basic concept question...

Glad to hear it is helping! Once you have finished the book you may want to add a review on Amazon to help guide other perspective buyers :-) Its a recently published book so there are not many reviews in yet.

Thanks, Robert
by savageautomate
Mon Dec 14, 2015 5:06 pm
Forum: Java
Topic: Pi4J Now Supports Non-Privileged Access (no more root/sudo)
Replies: 1
Views: 1635

Pi4J Now Supports Non-Privileged Access (no more root/sudo)

http://pi4j.com/images/logos/pi4j-header-small3.png The Pi4J Project now supports non-privileged access to the basic GPIO input and output functions of the Raspberry Pi as well as serial (UART), I2C and SPI communication. What this means is that launching your Java application with " sudo &quo...
by savageautomate
Sun Dec 13, 2015 11:30 pm
Forum: Java
Topic: Is PI4J's event listener thread-safe?
Replies: 3
Views: 1760

Re: Is PI4J's event listener thread-safe?

Glad I could help :-)

Thanks, Robert
by savageautomate
Sun Dec 13, 2015 11:25 pm
Forum: Java
Topic: Really basic concept question...
Replies: 7
Views: 2420

Re: Really basic concept question...

You certainly are not required to have the Pi connected on the network to work on your Java code. You can compile your JAR file(s) independently whenever you need. Only when you are ready to deploy them to the Pi hardware do you need the Pi connected or you could manually copy them to the SD card if...
by savageautomate
Fri Dec 11, 2015 5:52 pm
Forum: Java
Topic: Interchange data between arduino and raspberry
Replies: 2
Views: 1396

Re: Interchange data between arduino and raspberry

You could also build your own communication interface/bridge using serial (UART) communications if you don't want to go the USB route.

-Robert
by savageautomate
Fri Dec 11, 2015 5:50 pm
Forum: Java
Topic: Is PI4J's event listener thread-safe?
Replies: 3
Views: 1760

Re: Is PI4J's event listener thread-safe?

Yes, Pi4J does block on the callback event method invocation. With that said, you probably don't want any long running/blocking operations taking place directly in the event handler. Its fine for short tasks, but just don't block the event callback for long periods of time. If you are not already, I...
by savageautomate
Fri Dec 11, 2015 5:39 pm
Forum: Java
Topic: Really basic concept question...
Replies: 7
Views: 2420

Re: Really basic concept question...

Hi Tom, You may find a few Pi + Java articles on my blog interesting/helpful: http://www.savagehomeautomation.com/pi-slices/ If you are looking for an easy project to get started with GPIO, then this type of project is pretty simple/basic: http://www.savagehomeautomation.com/projects/raspberry-pi-su...
by savageautomate
Fri Dec 11, 2015 3:36 am
Forum: Troubleshooting
Topic: Pi4j, Multi threading and Raspberry Pi
Replies: 1
Views: 1805

Re: Pi4j, Multi threading and Raspberry Pi

Hi Brenn01, A couple of comments on the code. You are provisioning the same GPIO pins over again with each new thread. I'm not sure what negative impact that may or may not result in, but I would advise against provisioning the same pins in separate threads. Either only provision the pins you need i...
by savageautomate
Fri Dec 11, 2015 12:18 am
Forum: Java
Topic: Raspberry Pi with Java: Programming the Internet of Things
Replies: 3
Views: 3864

Raspberry Pi with Java: Programming the Internet of Things

Raspberry Pi with Java: Programming the Internet of Things (IoT) by Stephen Chin and James L. Weaver http://ecx.images-amazon.com/images/I/51aIMuueSdL._SX400_BO1,204,203,200_.jpg I had the opportunity to read this book cover to cover and can confidently say that it provides an excellent primer for ...

Go to advanced search