I have a Raspberry Pi 3B+ and switches (jqc3f-05vdc-c). When I run simple program on python like this:
[...] GPIO.setup(18, GPIO.OUT) GPIO.output(18, 0) [...]
my sweatch is off, on when i set GPIO.output(18, 1), but when I run program in Java:
[...] private GpioController gpio = GpioFactory.getInstance(); GpioPinDigitalMultipurpose gpio1 = gpio.provisionDigitalMultipurposePin(RaspiPin.GPIO_01,PinMode.DIGITAL_OUTPUT) gpio1.low() //high state gpio1.high() //low state [...]
Default i have High state on all switches, but when i run method .high() my switch turn off.
Someone had the same problem?