electro-smith / DaisyDuino

Arduino Support for the Daisy Audio Platform.
https://www.electro-smith.com/daisy
MIT License
92 stars 20 forks source link

added dedicated TwoWire for onboard codecs. #39

Closed stephenhensley closed 2 years ago

stephenhensley commented 2 years ago

For the new hardware (with WM8731 and PCM3060 codecs), the i2c comms were being done with the arduino global Wire object. This would cause the pins to get changed from the default, and cause unexpected results when attempting to use the global Wire object (since it's pins had been changed).

To resolve this, we added a global TwoWire object specifically for the Daisy class to use. That way there will be no interference on the global, and everything else can remain unchanged.

I've personally tested this with seed rev4, seed rev5, and patch_sm using the daisy pod, field, and patch.init() hardware.

I'd like to confirm that everything still works on a clean install on a different machine, but I think this should be good to go.