jperkin / node-rpio

Raspberry Pi GPIO library for node.js
857 stars 123 forks source link

MCP23017 example request #120

Closed jas777 closed 2 years ago

jas777 commented 4 years ago

Hello, I have a problem with MCP23017 - I've kinda "copied" python example code into JS and it doesn't work. Does anybody have a working example?

jperkin commented 2 years ago

I don't have any of these, sorry.

sarink commented 1 year ago

@jas777 Did you ever get it to work? @jperkin Does this lib support using a port expander (or, is there any reason it wouldn't)?

jperkin commented 1 year ago

Not directly, it only knows about native pins, but there's no reason why you can't use it to drive one.

jas777 commented 1 year ago

@jas777 Did you ever get it to work? @jperkin Does this lib support using a port expander (or, is there any reason it wouldn't)?

I ended up using i2c-bus, you can check my implementation at https://github.com/jas777/quassendorf/blob/main/src/mcp/MCP23017.ts