Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

a bug of v1.4 #535

Open
lixiaoxin1989 opened this issue Apr 7, 2021 · 0 comments
Open

a bug of v1.4 #535

lixiaoxin1989 opened this issue Apr 7, 2021 · 0 comments

Comments

@lixiaoxin1989
Copy link

lixiaoxin1989 commented Apr 7, 2021

I use CM4, ubuntu server 20.10 64 bit, wiringpi 2.60, pi4j 1.4.

Run the following code will cause the eth0 lost its ipv4 address, so the eth0 will not work untill reboot.

import com.pi4j.io.gpio.GpioController;
import com.pi4j.io.gpio.GpioFactory;
import com.pi4j.io.gpio.GpioPinDigitalOutput;
import com.pi4j.io.gpio.PinState;
import com.pi4j.io.gpio.RaspiPin;

GpioController gpio = GpioFactory.getInstance();
GpioPinDigitalOutput pin1 = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_17, "", PinState.LOW);
pin1.high();

But it's OK if run as following:

import com.pi4j.wiringpi.Gpio;

Gpio.wiringPiSetup();
Gpio.pinMode(17, Gpio.OUTPUT);
Gpio.digitalWrite(17, 1);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant