-
Notifications
You must be signed in to change notification settings - Fork 137
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
I2C write fails on "writeData" to ADC1115 #81
Comments
BTW, the Arduino code I reference above works with the same chip using an Arduino with a variable resistor. |
(I have seen this issue, need to find some time to look into this :) ) |
Looking at the arduino library, they write one byte at a time even if they could have used Wire.write(data, length) that does the same thing, weird. But in our case sending multiple bytes performs a Have you tried sending single bytes? Also, and this is likely why this fails, this:
does not match with the arduino code:
That
|
I'm guessing that I tried sending single bytes at some point - I was trying everything - but don't recall for sure. When I get back to working with that chip I'll definitely give your code a try and report back in case it helps others. Thanks! |
@uraimo Can you help me? |
Board Type
RaspberryPi3 B
Operating System
Ubuntu Mate 16.04
Swift Version
Pre-built 4.1.3
Description
Communicating with the ADC1115 analog to digital convertor.
I'm basing my implementation on the approach described here for Arduino.
Communication with the device is fine.
i2cdetect -y 1
reports the board as present at address 0x48.Here is my code:
Please list any error message you've receveived during execution.
When I attempt to do a
writeData
write, I get this error message:(True refers to the result of
isReachable(72)
.)The text was updated successfully, but these errors were encountered: