GPIO crash
    Tristan Linnell 
    talinnell at gmail.com
       
    Mon Jul 14 14:45:28 UTC 2014
    
    
  
Hi guys,
I am adding a simple PinListener to a GPIO pin on a RaspberryPi board and
the latest DeviceIO (Revision 12), cross-compiled from source.
I am seeing a NullPointerException being thrown from the DeviceIO
EventQueue.
The same problem exists when running on both Arch Linux and Raspbian.
I am using the same pin configuration as GPIOInputSample.java:
GPIOPinConfig pinConfig = new GPIOPinConfig(0,
                    22,
                    GPIOPinConfig.DIR_INPUT_ONLY,
                    GPIOPinConfig.DEFAULT,
                    GPIOPinConfig.TRIGGER_RISING_EDGE |
GPIOPinConfig.TRIGGER_FALLING_EDGE,
                    true);
GpioPin toRead = (GPIOPin)DeviceManager.open(GPIOPin.class, pinConfig);
toRead.setInputListener((PinEvent e) -> System.out.println(e.getValue()));
I have physically attached the pin to a rotary encoder. After around 50 or
so events which are correctly logged to the console as expected, I receive
the following NullPointerException:
Exception in thread "Thread-1"
true
java.lang.NullPointerException
at com.oracle.dio.impl.EventQueue$NativeMethodThread.run(EventQueue.java:91)
at java.lang.Thread.run(Thread.java:744)
Thank You,
Tristan Linnell
    
    
More information about the dio-dev
mailing list