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

Add MCP23017 port expander support as a lua module #3057

Closed
plomi-net opened this issue Mar 21, 2020 · 4 comments
Closed

Add MCP23017 port expander support as a lua module #3057

plomi-net opened this issue Mar 21, 2020 · 4 comments

Comments

@plomi-net
Copy link
Contributor

plomi-net commented Mar 21, 2020

Missing feature

Hello,
I would like to contribute a few things to this great project.

I saw that there are already issues for the MCP23017 Port Expander. Unfortunately I didn't find any Lua or C modules in the current dev branch.

Without looking into the issues, I just created a module in Lua for the MCP23017.
Now I would like to learn more and adapt the module to become part of this project.

Justification

This module can help other IoT developers to easily provide more GPIO pins, for example to control a relays card.

Workarounds

I am not sure which workaround represents a good solution.

Kind regards,
Marcel

@marcelstoer
Copy link
Member

Contributions are welcome. Consider #3034.

@jmd13391
Copy link

@plomi-net, Have you see this?

MCP23008 Module

I am currently using this Lua Module to extend the ESP8266 GPIO with great success.

@plomi-net
Copy link
Contributor Author

Hi @jmd13391, @marcelstoer

Thank you very much for your comment.
I had seen the module for the MCP23008 chip and that inspired me to create a module for the MCP23017.

For my project I need 16 channels, theoretically 128 pins would be possible with 8 MCP23017.
I could also have used two MCP23008.

I will refactor my module in the next few days and then provide it.

@plomi-net plomi-net mentioned this issue Apr 10, 2020
4 tasks
@plomi-net
Copy link
Contributor Author

plomi-net commented Apr 10, 2020

Hi,
some time has passed, now.

I have attached the program code with a pull request.
I hope the refactor succeeded and helps someone to extend the nodemcu.
If anyone has any comments or feedback, please let me know.

thanks a lot

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

3 participants