Hi,
Read:
boolean value;
char data[] =new char[1];
FileReader ff =new FileReader(path);
ff.read(data);
value = !(data[0] =='0');
ff.close();
Write:
boolean value =true;
FileWriter writer =new FileWriter(path);
if (value) {
writer.write("1");
}else {
writer.write("0");
}
writer.close();
*********************************************
String path =|"/sys/class/gpio/gpio48/value";|
Arsi
------------------------------------------------------------------------
*From:* Hoerting Business
*Sent:* Thursday, April 21, 2016 7:13PM
*To:* Beagleboard
*Subject:* [beagleboard] BBB GPIO access with java
Hello!
Did someone know a good free LIB for accessing the GPIO from the
Beaglebone Black?
I know:
http://libbulldog.org/bulldog/
But not sure if I make mistakes ... very often I cannot inititalize:
private final Board board = Platform.createBoard();
This happens, when I destroy my class. I do before this:
board.shutdown();
And add a new instance of my class.
Then it often happen that the command give an error.
So is there another lib for control GPIO in Java?
Thank you!
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google
Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/9f6d0da8-3a08-4467-b950-2af84e666374%40googlegroups.com
<https://groups.google.com/d/msgid/beagleboard/9f6d0da8-3a08-4467-b950-2af84e666374%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/5719D8A0.7070306%40chello.sk.
For more options, visit https://groups.google.com/d/optout.