Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use the framework in combination with i2c libraries (mcp23017.h) #83

Open
kamerforpresident opened this issue Apr 7, 2021 · 1 comment

Comments

@kamerforpresident
Copy link

kamerforpresident commented Apr 7, 2021

Hi @tinkerspy,

First a big thumbs up for the framework! So powerful and well designed. I am just a hobbyist and tinkerer working with i2c devices on arduino / esp8266. I am familiar with C++, but less with the OO part.

I would like to have some clue on how to extend your "atm_button" and "atm_led" components to be used in combination with mcp23017 i2c port extenders. Available libraries offer their own classes and methods to control the pins on the port extenders (connected via i2c bus)

The following library I would like to use the automaton framework:
(https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library).

I am working on fun projects like garden irrigation, automated mini railroads and micro beer brewery using arduino and my own state machine coding, which is limited and will heavily benefit from using automaton.

Best (en groeten)
Remko

@tinkerspy
Copy link
Owner

I think I'd just copy the existing atm_led & atm_button classes and create atm_mcp23017_button and atm_mcp23017_led classes. Include the mcp23017 library and modify the code. It shouldn't be too difficult.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants