Skip to Main Content

Embedded Technologies

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Accesing GPIO using JAVA and Python/PHP

user10303583May 22 2014 — edited May 26 2014

Hello All,

I apologize for posting this in the JAVA ME Embedded section. I had previously posted this under the JAVA Embedded MOOC section. I just realized then there is another space for JAVA ME issues.

I am accessing my GPIO pins using PHP and JAVA. However, there is an issue when the pin is exported as input/output by PHP (or manually) before it is accessed using JAVA.

As an example, when the pin is configured as output by my php code  (or manually echo 7 > /sys/class/gpio/export), I get an exception in my JAVA code when I try to create an instance of this GPIO pin (pin 7).

DeviceManager.open(7) throws the exception "[ERROR] [DAAPI] iso=-1:There is unexpected error, when open GPIO pin 7"

Is there a way to create an instance of GPIOPin for an pin that has already been exported out as an I/O?

Thanks,

Mahesh Ganapathy

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 23 2014
Added on May 22 2014
1 comment
1,154 views