thoth:
@SurferTim I posted the full file here if you'd like to see it:
hydrobot/arduino/hydrobot/hydrobot.ino at master · Bokbot/hydrobot · GitHub
I'm calling Wire.begin(107) in my setup
@ChuckTodd might you have any example code for this? I'm kind of confused as I only call Wire.begin once so I'm not certain if I should just be spamming it in my loop, or only after the pH code fires off?
Attached is a Zip file of my Wire library with examples:
It is a Wire.h replacement. with a lot of new features. Just use the Arduino library manager to install it. After it is installed, you will start receiving this Warning message :
Multiple libraries were found for "Wire.h"
Used: C:\Users\user\Documents\Arduino\libraries\Wire
Not used: C:\Program Files\Arduino\hardware\arduino\avr\libraries\Wire
don't be alarmed. It is actually telling you the truth. Because my Wire.h is superseding the Arduino's default Wire.h.
These directories may be different, it depends on where your Arduino is installed.
All you have to do to get rid of my Wire library, is just to delete the subdirectory. It will be in your libraries folder.
In my example I would delete C:\Users\user\Documents\Arduino\libraries\Wire
The Example called 'master.ino' is the one you want to look at. It requires 2 UNO's both powered up, A4-A4, A5-A5, Gnd-Gnd, and ONE of the UNO's needs a jumper from A0 to GND. This jumper is used to select it's I2C address one uses 0x58, the other uses 0x59. If you start two Instances of the Arduino Environment and download the code to each UNO, and open both Serial Monitors, you can see the action, and control each one.
My Modified Wire.h supports better error recovery, and allows simpler multibyte transfers. It uses Nick Gammon's I2C anything templates.
Chuck.
P.S. to test the difference between the 'standard' Wire library and mine, short out the SDA(A4) to ground. The standard Wire library will hang until the short is removed, mine will return a bus timeout Error after one second. (I needed this feature for one of my applications were I2C sensors were physically destroyed during normal use.)
Wire.zip (19.7 KB)