willhey / mcp23017chip

Node-red mcp23017chip
MIT License
6 stars 7 forks source link

Address mcp #7

Open dsrawding opened 4 years ago

dsrawding commented 4 years ago

I've been using node-red for a week now and have been trying to get my MCP board to work. Unfortunately I must be doing something wrong. It works fine if I address the board with a command like: gpio -x mcp23017:100:0x22 write 100 1. However I can't seem to get your node to work. The MCP is on 0x22 and I've set the bit to 0, 1 and 100 and none seem to respond. I put a switch in front of the MCP output and both seem to turn on/off in node-red but the MCP pin never changes state. If you have any ideas or can tell me what I'm doing wrong it would be greatly appreciated! Thanks for all the work you put into this node.

[{"id":"e3602723.c8121","type":"ui_switch","z":"87f5fa32.a88998","name":"","label":"LED MCP","tooltip":"","group":"d8d0b89a.d02be","order":4,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"false","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"true","offvalueType":"bool","officon":"","offcolor":"","x":560,"y":460,"wires":[["ad88e9ac.0baf88"]]},{"id":"ad88e9ac.0baf88","type":"mcp23017output","z":"87f5fa32.a88998","name":"","chip":"d5fbc80c.043ab","bitNum":"100","invert":false,"x":630,"y":400,"wires":[[]]},{"id":"d8d0b89a.d02be","type":"ui_group","z":"","name":"LED","tab":"a31b080e.9e41c","order":7,"disp":true,"width":"6","collapse":false},{"id":"d5fbc80c.043ab","type":"mcp23017chip","z":"","addr":"0x22","interval":"1000"},{"id":"a31b080e.9e41c","type":"ui_tab","z":"","name":"Monitoring","icon":"dashboard","disabled":false,"hidden":false}]