Comments (13)
@born2net and anyone else interested in GPIO on the Raspberry Pi.
onoff is actually a platform independent package that functions on multiple systems like the Raspberry Pi and the BeagleBone. Rather than extending onoff with Raspberry Pi specific code, I decided to implement a new package called pigpio that is specifically tailored to the Raspberry Pi. pigpio already supports the following features:
Features
- Digital read and write
- PWM on any of gpios 0 through 31
- Servo control on any of gpios 0 through 31 (untested)
- Pull up/down resistors
- Interrupt handlers
So @born2net, I'd suggest taking a look at pigpio and recommend using it on the Raspberry Pi when onoff doesn't fit the requirements.
from onoff.
Are you aware of a technique for performing this in a platform independent way?
There's info about how to use the tree on the Raspberry Pi here although it is far from transparent.
from onoff.
yes but it would be great if we could control through the lib, just like Python does it...
from onoff.
Can the Python lib do it without sudo?
from onoff.
I believe it does need sudo, but for me and many others that's just fine as I run as root, or use helper exec such as utlity runuser to for added privileges.
I think onoff is the PERFECT lib, and it's the last thing it's missing to be the BEST!
from onoff.
Thank you for your kind words, but I don't know if I want to add a C++ addon to onoff for achieving this.
If this is the last thing missing to make onoff the BEST, then what, in your opinion, is the BEST today?
from onoff.
I can tell you that the most popular hardware today for the raspberry pi
are the adafruit hats, servo, lcd, motors, and they all use i2c. no one had
translated their api to node, and that would be very awesome...after u add
the pull up down resistor option ;)
On Oct 2, 2015 4:29 PM, "Brian Cooke" [email protected] wrote:
Thank you for your kind words, but I don't know if I want to add a C++
addon to onoff for achieving this.If this is the last thing missing to make onoff the BEST, then what, in
your opinion, is the BEST today?—
Reply to this email directly or view it on GitHub
#38 (comment).
from onoff.
onoff doesn't support I2C (but https://github.com/fivdi/i2c-bus does). I'm not sure I fully understand now. Is the pullup/pulldown support you need related to I2C?
from onoff.
No I just needed to have the ability to change the pull up and pull down on
projects that I'm using the library for
On Oct 3, 2015 1:23 AM, "Brian Cooke" [email protected] wrote:
onoff doesn't support I2C (but https://github.com/fivdi/i2c-bus does).
I'm not sure I fully understand now. Is the pullup/pulldown support you
need related to I2C?—
Reply to this email directly or view it on GitHub
#38 (comment).
from onoff.
It looks like it should be possible to achieve this on the Raspberry Pi without requiring the use of sudo.
from onoff.
You could add that that would be awesome
On Oct 3, 2015 9:22 AM, "Brian Cooke" [email protected] wrote:
It looks like it should be possible to achieve this on the Raspberry Pi
without requiring the use of sudo.—
Reply to this email directly or view it on GitHub
#38 (comment).
from onoff.
sure, will check it out tx!!!
from onoff.
@born2net I'm going to close this issue.
If Linux is ever extended to provide a platform independent mechanism for configuring pull-up and pull-down resistors, onoff will also be extended to make use of such a mechanism. onoff is very unlikely to be extended to make use of platform specific mechanisms.
The alternative in this case is to use platform specific libraries such as pigpio.
from onoff.
Related Issues (20)
- 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 HOT 2
- fs error HOT 8
- Newer version of epoll
- Button.watch spams endlessly HOT 1
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.