GithubHelp home page GithubHelp logo

Comments (6)

flyte avatar flyte commented on August 15, 2024

Schön abend, Charly!

I believe its possible, yes. I'll take a look at the code later, but from memory I expect it to be a simple change.

Ich werde versuchen es machen bald.

from mqtt-io.

Rohrleitner avatar Rohrleitner commented on August 15, 2024

from mqtt-io.

BenjiU avatar BenjiU commented on August 15, 2024

What would be the default mode? GPIO.BCM?
Should we check for errors, if another python module changed the numbering and we could get a inconsistancy?

To detect which pin numbering system has been set (for example, by another Python module):
mode = GPIO.getmode()
The mode will be GPIO.BOARD, GPIO.BCM or None

from mqtt-io.

flyte avatar flyte commented on August 15, 2024

Good questions, @BenjiU

I'd say use what we're using now for numbering as default, if only to be more backwards compatible. Is one more of a defacto standard than the other?

When would you suggest checking the mode? If we're setting the mode explicitly, then that should suffice during the setup phase, but do you suggest checking the mode before each read/write operation too? Perhaps this should be configurable, since it may add a performance penalty.

from mqtt-io.

BenjiU avatar BenjiU commented on August 15, 2024

Hi,
I'm always using gpio.BCM, keep it for backward compatibility. Good idea.

I just googled a little bit and I'm not sure, if we need a check. Does someone know, how it works, when linux program uses a library, is it copied and exclusive or shared with different executed programs? Maybe we don't need a check. I'll try next week on a raspberry with different programs.

from mqtt-io.

yozik04 avatar yozik04 commented on August 15, 2024

@BenjiU Did you had a chance to check? I have implemented that for Orange Pi in Orange Pi pull request.

from mqtt-io.

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.