This repository has been archived by the owner on Jan 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 446
RaspiBcmPin.GPIO_13 not working even in BROADCOM_PIN_NUMBERING #276
Comments
Issue reproduced; looking into the problem. |
Fixed in latest deployed 1.2-SNAPSHOT. |
Does not seem to be fixed in 1.2-SNAPSHOT. The issue is only occurring for DigitalInputPin. |
I just tested it again. BCM as InputPin is not working. I'm using Snapshot 1.2 and Raspberry 3B. Here is the code. I used a LED to test the output behavior and a reed switch to test the input behavior. public static void main(String[] args) throws InterruptedException {
testInputBCM();
}
//working
public static void testOutput() throws InterruptedException {
GpioController gpioController = GpioFactory.getInstance();
GpioPinDigitalOutput pin = gpioController.provisionDigitalOutputPin(RaspiPin.GPIO_21);
pin.setShutdownOptions(true, LOW);
pin.setState(HIGH);
Thread.sleep(5000);
gpioController.shutdown();
}
//working
public static void testOutputBCM() throws InterruptedException {
GpioFactory.setDefaultProvider(new RaspiGpioProvider(BROADCOM_PIN_NUMBERING));
GpioController gpioController = GpioFactory.getInstance();
GpioPinDigitalOutput pin = gpioController.provisionDigitalOutputPin(RaspiBcmPin.GPIO_05);
pin.setShutdownOptions(true, LOW);
pin.setState(HIGH);
Thread.sleep(5000);
gpioController.shutdown();
}
//working
public static void testInput() throws InterruptedException {
GpioController gpioController = GpioFactory.getInstance();
GpioPinDigitalInput pin = gpioController.provisionDigitalInputPin(RaspiPin.GPIO_21);
pin.addListener((GpioPinListenerDigital) event -> System.out.println("Input GPIO 21"));
Thread.sleep(5000);
gpioController.shutdown();
}
//not working
public static void testInputBCM() throws InterruptedException {
GpioFactory.setDefaultProvider(new RaspiGpioProvider(BROADCOM_PIN_NUMBERING));
GpioController gpioController = GpioFactory.getInstance();
GpioPinDigitalInput pin = gpioController.provisionDigitalInputPin(RaspiBcmPin.GPIO_05);
pin.addListener((GpioPinListenerDigital) event -> System.out.println("Input GPIO BCM (05)"));
Thread.sleep(5000);
gpioController.shutdown();
} |
Any news? |
FWIW BCM 12, 13 and 14 working for me with SNAPSHOT-1.2 fetched today. Many thanks! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
My usage is that I'm listening for change events. It is very odd as RaspiPin.GPIO_23 works but not RaspiBcmPin.GPIO_13 even though I've set broadcom pin numbering (and other usages take notice of the numbering scheme).
I'm afraid I've not characterised the problem yet but wondered if it rang any bells.
The text was updated successfully, but these errors were encountered: