Comments (6)
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.
from mqtt-io.
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.
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.
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.
@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)
- Issues with paho-mqtt 2.0 HOT 5
- Crash using gpiod HOT 1
- Release version 2.3.0
- New version not working HOT 12
- Wont Connect to MQTT Broker and getting error in log from python script HOT 2
- DHT22 Adafruit_DHT problem HOT 3
- MCP23017 module not starting in mqtt-io Add-on HOT 1
- Crash on startup HOT 6
- Request support for Orange Pi CM4
- Incompatibility Python typing-extensions HOT 1
- adxl345 Module outdated and does not install HOT 1
- MQTT does not reconnect on authentication failure
- docker not buildable due to "Package docutils (0.21.post1) not found."
- Add support for HTU21d
- Adafruit_DHT (DHT22, ...) package is deprecated on Raspberry Pi HOT 5
- mqtt_io/modules/sensor/bmp085.py:51:0: C0305: Trailing newlines (trailing-newlines)
- Generate Documentatio not working - blocks release
- Incompatible constraints in requirements of mqtt-io (2.4.3)
- AttributeError: module 'paho.mqtt.client' has no attribute 'WebsocketWrapper' HOT 1
- !!Important - Publish to PyPI does not work HOT 2
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 mqtt-io.