Skip to Main Content

GPIO ME Example with RASPBERRY Pi

HarrySattDec 23 2015 — edited Dec 26 2015

Hi

I am trying out the GPIO sample from the 8.1 NetBeans IDE with Oracle Java Platform Micro Edition SDK 8.2 and the RaspberryPi 2 Mod B. Compile works after setting IO Pins in the JAD properties for the RaspberryPi 2 Mod.B. But running gives me an exception:

******************************************

*         GPIO Sample started!           *

******************************************

Opening the GPIO pin with id 2 for the button

GPIO pin for the button is opened

Opening the GPIO pin with id 1 for the LED

GPIO pin for the LED is opened

TRACE: <at java.lang.UnsupportedOperationException: Try to register Listener to output pin>, startApp threw an Exception

java.lang.UnsupportedOperationException: Try to register Listener to output pin

- .unknown...unknown.(), bci=25

- com/oracle/jmee/samples/gpio/GPIOSample.startApp(), bci=528

- .unknown...unknown.(), bci=1

- .unknown...unknown.(), bci=5

- .unknown...unknown.(), bci=236

- .unknown...unknown.(), bci=38

- .unknown...unknown.(), bci=5

- .unknown...unknown.(), bci=127

- com/sun/midp/main/AppIsolateMIDletSuiteLoader.main(), bci=26

java.lang.UnsupportedOperationException: Try to register Listener to output pin

- .unknown...unknown.(), bci=25

- com/oracle/jmee/samples/gpio/GPIOSample.startApp(), bci=528

- .unknown...unknown.(), bci=1

- .unknown...unknown.(), bci=5

- .unknown...unknown.(), bci=236

- .unknown...unknown.(), bci=38

- .unknown...unknown.(), bci=5

- .unknown...unknown.(), bci=127

- com/sun/midp/main/AppIsolateMIDletSuiteLoader.main(), bci=26

******************************************

*         GPIO Sample destroyed          *

******************************************

This means that this pin id=2 is not usable as input. What have I to do?

Thanx, Harald.

Comments
Post Details
Added on Dec 23 2015
5 comments
1,716 views