Open setnicka opened 7 years ago
Hmm I think this would need bigger rewrite - there is problem that the same pin is capable of analog input and digital output, but there is two instances of pin in that case (one in analog
list and one in digital
list).
I will prepare some patch and send a pull request, but this will lead to some changes in API to correct this bug. Boards definitions should contain real pin numbers for analog inputs (or some mapping of them), or auto configuration should be used.
Prepared for merge in #52. After this will be merged I am ready to sent more pull requests with new features based on this rewrite :-)
In
util.py
in functionpin_list_to_board_dict
there are some assumptions which may not be always true:For example I have some board, which returns this byte array of capabilities for some pin: [0, 1, 11, 1, 1, 1, 4, 14] I think we need to save capabilities for the pins in more general way.
@tino have you any idea how do you want to implement these features? I am ready to implement them and send a pull request (and other pull request to add pin state queries).