Comments (2)
That's as useful as ls /usr/bin
: too much information, but it should be there. ls /usr/bin | grep python
might make sense. That's what happens when one have board.all_pins
and use for something like [el for el in board.all_pins if isinstance(el, SupplyPin)]
Back to a shell, one can type python[TAB]
to find all Python versions available, which would be simpler. Likewise, attributes that already selects a class of highly used pins would be useful. That's probably be the case for the data pins (board.data_pins
?), which includes digital and analog pins, and for digital pins (board.digital_pins
?). But how about PWM pins? I²C pins? UART pins? Analog output-only pins? Pins with pull-up resistors internally? I still think that having some attribute to store the knowledge of all pins is useful.
For some pins, the easiest way to access by a name, like board.all_pins["SCL"]
for getting the only I²C clock pin on it. To find if a board have such pin, a trial-and-error approach would do, but something like "SCL" in board.all_pins
would be better (which would need a __contains__
for the type(all_pins)
to allow pin aliases).
from pingo-py.
@danilobellini and @ramalho,
Thanks for your suggestion.
We have this function selection with the Board.filter_pins
This came on this (quite old) commit 55339e6
digital_subset = self.board.filter_pins(pingo.DigitalPin)
from pingo-py.
Related Issues (20)
- Support WRTnode
- raise ArgumentOutOfRange() missing apropriated value
- The GPIOs of Galileo2 only have location, they not have gpio_id HOT 1
- PWM on broken on Arduino HOT 1
- test_jumpwire fails on my Raspberry Pi 2 model B HOT 3
- New to pingo, can't get it working ! HOT 2
- Create a Debian package and submit to mentors.debian.net HOT 2
- Version on Pypi differs to tag version in github HOT 1
- Automagically create mocks (fakes) when the app is running outside a board HOT 5
- Switch / Push button : short pressed / long pressed events
- Pingo, MQTT and IoT
- Python 3 support HOT 2
- board = pingo.detect.get_board() or board = pingo.detect.MyBoard() ? HOT 1
- time to sleep should be configurable
- Switch / led parts : stop blinking led should fallback to previous led state (before blinking)
- Using a signal / slot pattern for parts ?
- Parts Swich (or PushButton?) without polling task HOT 6
- Pingo and RPi-Distro/python-gpiozero HOT 4
- Failed to detect HOT 2
- Is there any preview for getting Pingo in Python 3.5 HOT 3
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 pingo-py.