helins / linux-gpio.java Goto Github PK
View Code? Open in Web Editor NEWUse the standard Linux GPIO api from Java
License: Mozilla Public License 2.0
Use the standard Linux GPIO api from Java
License: Mozilla Public License 2.0
When I run the push buttons example, event.getId()
always returns 0.
Any idea why that might be happening?
I'm running the code on an UP board, Ubuntu 16.04
I changed the device path and line numbers to match my board:
PATH_TO_DEVICE = "/dev/gpiochip4" ;
LINE_NUMBER_BUTTON_1 = 6 ;
LINE_NUMBER_BUTTON_2 = 5 ;
run output:
Starting push buttons...
Come on, press any button and keep pressin' ! Program will terminates after 15000 milliseconds of inactivity.
// when I push the 1st button (expected output: button 1)
1598314100861091495 button 0
1598314101203325508 button 0
// when I push the 2nd button (expected output: button 2)
1598314106373799169 button 0
1598314106500737447 button 0
Timeout, terminating program...
Hi,
I'm using your library to detect button press connected to gpio lines on imx6 board running embedded linux (buildroot). When I call GpioEventHandle requestEvent() to register the handle I'm getting IO exception: java.io.IOException: A requested line is already being used elsewhere
I read in your javadoc that request can be handled by one instance at a time. Is there a way to newly register request handle and overriding consumer which is already using it by setting new one? (FYI I did getconsumer on gpio line and it shows "sysfs")
Thanks
Hello,
I tested your lib with openjdk8. I recompiled all the dependencies and linux-gpio.java. It is working.
Nice job, I can count pulses in user space up to without any errors at 100hz (I didn't test greater frequency).
So, your default target can be java 8, it won't be a problem.
It can help other people that use old jdk for some reasons like me.
(this is really not a big issue)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.