25 ms·
Looks like a sane approach to configuring the GPIO pins. It would be nice if one could give the pins names in the config file, and somehow use this to refer to
by osivertsson 12y ago
Looks like a sane approach to configuring the GPIO pins.
It would be nice if one could give the pins names in the config file, and somehow use this to refer to them in the code to avoid 'pins.read(18)' and instead have 'pins.read(pins.get("name"))' [or whatever is the best way to write it in Python...]
This would avoid problems when changing the config but forgetting to change the source, and vice versa, and getting weird bugs because it is out of sync somewhere.