You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Looks good - would it be possible to tweak the names a little (and add a connect function) so it had a similar API to - using read(pin) etc? It'd just be nice for users to be able to swap between different port expanders without changing code.

    Also, if you were able to add fields for A0..A7 which themselves were instances of a class with read/write fields then you could actually pass them into quite a few other modules as if they were normal Pins.

    For example digitalWrite(expander.A0, 1) would just magically work.


Avatar for Gordon @Gordon started