GithubHelp home page GithubHelp logo

Comments (13)

fivdi avatar fivdi commented on May 20, 2024 1

@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.

fivdi avatar fivdi commented on May 20, 2024

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.

born2net avatar born2net commented on May 20, 2024

yes but it would be great if we could control through the lib, just like Python does it...

from onoff.

fivdi avatar fivdi commented on May 20, 2024

Can the Python lib do it without sudo?

from onoff.

born2net avatar born2net commented on May 20, 2024

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.

fivdi avatar fivdi commented on May 20, 2024

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.

born2net avatar born2net commented on May 20, 2024

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.

fivdi avatar fivdi commented on May 20, 2024

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.

born2net avatar born2net commented on May 20, 2024

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.

fivdi avatar fivdi commented on May 20, 2024

It looks like it should be possible to achieve this on the Raspberry Pi without requiring the use of sudo.

from onoff.

born2net avatar born2net commented on May 20, 2024

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.

born2net avatar born2net commented on May 20, 2024

sure, will check it out tx!!!

from onoff.

fivdi avatar fivdi commented on May 20, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.