nightm_92
Posts: 3
Joined: Mon May 17, 2021 9:35 pm

Pi4J v1.4 not change status GPIO (CM4IO)

Mon May 17, 2021 9:44 pm

Hello everyone,

starting the Pi4j v1.4 "BlinkGpioExample" example on CM4IO no blink occurs.

By connecting the multimeter to pins "GPIO_01" and "GPIO_03", initially the value is 0 Volt, once the program is started it remains fixed at 3.3V.

Even doing a program from scratch on any GPIO PIN it seems that once the value from 0 to 1 is changed for the first time, the change does not take place.

I tried to execute the blink command also through "gpio blink [PIN]", but nothing, doing a "gpio readall" I see the voice Low and High continuously, but through the multimeter or simple circuit with a resistor and an LED it does not happen nothing (connecting it directly to the 3.3V PIN works correctly).

Has this ever happened to you? Can you help me?

Thank you

nightm_92
Posts: 3
Joined: Mon May 17, 2021 9:35 pm

Re: Pi4J v1.4 not change status GPIO (CM4IO)

Tue May 18, 2021 2:57 pm

After several tests, I noticed that the library works correctly with the Raspbian Pi OS image.

In my case I was using the Raspbian Pi OS LITE image.
The pigpio library is not installed in the Raspbian Pi OS LITE image:

Download and install the latest version

Code: Select all

wget https://github.com/joan2937/pigpio/archive/master.zip
unzip master.zip
cd pigpio-master
make
sudo make install
If the Python part of the installation fails, it might be because you need the configuration tools.

Code: Select all

sudo apt install python-setuptools python3-setuptools
link: http://abyz.me.uk/rpi/pigpio/download.html

nightm_92
Posts: 3
Joined: Mon May 17, 2021 9:35 pm

Re: Pi4J v1.4 not change status GPIO (CM4IO)

Tue May 18, 2021 9:02 pm

Sorry, but the solution only works with the Pi4 model, but with the CM4IO it doesn't.

Do you have any ideas? Has this ever happened to you?

If I run it via command line "gpio blink [pin]" it doesn't work.

mattlewis
Posts: 136
Joined: Sat Jan 12, 2013 3:05 pm
Location: UK
Contact: Website

Re: Pi4J v1.4 not change status GPIO (CM4IO)

Wed May 19, 2021 3:50 pm

Just in case you want to try an alternative approach, diozero is tested on the CM4.
https://www.diozero.com/

Return to “Java”