Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

Reply To: MaximDS18 on I2C Hub

Home Forums Mayfly Data Logger MaximDS18 on I2C Hub Reply To: MaximDS18 on I2C Hub

#14029
Sara Damiano
Moderator

If your goal is to have everything on that one 4-port splitter – it won’t work.

The DS18 isn’t I2C – it’s OneWire.  If you really want to use it on that Grove port, you should be able to use it as either D16(SCL) or D17(SDA), but I strongly suspect that attempting to dual-use one of the I2C pins for OneWire would screw up communication with actual I2C devices (like the build in clock or ADC and your little display).  I’d be surprised if you could even get a sketch to run.  The I2C library (from Arduino core) has a bug (a while loop with no timeout) such that if either pin on the I2C bus is held low during any I2C communication the board will freeze in endless wait.  If you really have your heart set on that connection pattern, you can experiment with it, but I’d just just a different port if I were you.