-
Notifications
You must be signed in to change notification settings - Fork 0
Tristin driver tutorial #4
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, a good start! Just a few things you need to change with your I2C reads and writes, and which addresses you are using.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments for main.cpp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once again, please resolve the previous comments since you've dealt with them.
src/main.cpp
Outdated
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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