Conversation
bquan0
left a comment
There was a problem hiding this comment.
Overall, a good start! Just a few things you need to change with your I2C reads and writes, and which addresses you are using.
bquan0
left a comment
There was a problem hiding this comment.
Some comments for main.cpp.
bquan0
left a comment
There was a problem hiding this comment.
The functionality looks good to me, just a few things in main.cpp that need to be fixed. Good job with fixing the I2C reads!
Also, for future reference, please resolve conversations after fixing them instead of reacting with 👍 . It makes reviewing the PR easier for me.
bquan0
left a comment
There was a problem hiding this comment.
Once again, please resolve the previous comments since you've dealt with them.
| void setup() { | ||
| // TODO: initialize i2c and mcp23017 object | ||
| Wire.begin(); | ||
| uint8_t directions[8] = {1, 1, 1, 1, 1, 1, 1, 0}; |
There was a problem hiding this comment.
Good catch on the array not being 8 numbers long, but you still haven't addressed the problem I mentioned last time. According to the data sheet, 1 = input and 0 = output. If you wanted to turn on an LED with pin 0, would that require an input to the IO expander or an output from the IO expander?
Changed the mc23017.cpp and main.cpp according to the driver tutorial for Bowen Quan