Comments (4)
Is the following the case:
- The program is creating a
Gpio
object where the direction is"output"
and theedge
is"rising"
,"falling"
, or"both"
. - Linux kernel > 3.13 is being used.
dmesg
may also be displaying messages similar to these:
[ 1180.184658] GPIO chip pinctrl-bcm2835: gpio_lock_as_irq: tried to flag a GPIO set as output for IRQ
[ 1180.184688] gpio-17 (sysfs): failed to flag the GPIO for IRQ
If this is the case, then the error is explained by the fact that the Linux 3.13 kernel dropped support for detecting changes on GPIO output pins per hardware interrupt. It can still detect interrupts on input pins.
This is documented in the onoff readme here :).
See also raspberrypi/linux#808 and torvalds/linux@d468bf9
from onoff.
That's precisely it: new Gpio(4, 'out', 'falling');
What a bummer. Would an acceptable workaround be to initialize as an input, then switch to an output if I need to drive it?
from onoff.
Given that I have no information about the circuit you're building, I don't know. If everything is electrically ok, the setEdge and setDirection methods could probably be used to handle the software side of things.
from onoff.
Electrically everything is fine - it was working on a RPi model B+ before I upgraded to RPi 2. I was most likely using an older version of raspbian.
from onoff.
Related Issues (20)
- Watch is not working on a button but readSync is HOT 2
- fs.js:114 throw err; ^ Error: EBUSY: resource busy or locked, write HOT 5
- Nvidia jetsons compatibiity HOT 5
- Problem using watch function with relay HOT 10
- Initialize GPIO without change pin status. HOT 6
- GPIO not working in a worker_thread - nodejs 14.15 HOT 2
- EACCES: permission denied, open '/sys/class/gpio/export' as superuser HOT 2
- Cannot run on non Rpi system HOT 1
- TypeError: writeSync is not a function HOT 4
- Raspberry Pi GPIO control in electron App HOT 8
- My computer does not have a /sys/class/gpio directory, but has /dev/gpiochip* HOT 1
- Interrupt misfire HOT 3
- Raspberry 4 - malloc(): corrupted top size HOT 3
- Error: EPERM: operation not permitted, write HOT 4
- Does not work with Compute Module 4. HOT 2
- Event is fired multiple times
- Superb library - I am running on Node v20 HOT 2
- Pi 5 Compatibility issues HOT 9
- Compatibility with ppp asked?
- RPI 5 gpio numbers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onoff.