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)
- ina219 i2c_bus_num - unknown field HOT 3
- Stream sensor (serial) not reliable
- Running mqtt-io as a service on Raspberry Pi
- Version 2.2.9 is not available on PyPI HOT 4
- Pinned PyYAML version incompatible with latest Cython 3.0.0 HOT 6
- continuous crashes on pi 3b+ HOT 4
- In case of reconnection to MQTT broker subscriptions are lost
- pip fails on pyyaml, poetry fails on requests.utils on a raspberry pi zero w HOT 8
- How to add and reuse values in config files? HOT 1
- Chip has no attribute 'OPEN_BY_NAME' - Orange Pi Zero HOT 2
- KeyError when trying to run on Orange Pi Zero 2W, Ubuntu 22.04 HOT 2
- Raspberry pi 5 support? HOT 1
- use RPIO instead of RPi.GPIO
- Separate Devices Running MQTT IO Are Recognized as a Single Device in Home Assistant HOT 1
- MQTT Io On OrangePi 5 HOT 1
- 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
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.