Wire (I2C)
setSpeed()
Sets the I2C clock speed. This is an optional call (not from the original Arduino specs.) and must be called once before calling begin(). The default I2C clock speed is 100KHz and the maximum clock speed is 400KHz.
// SYNTAX
Wire.setSpeed(clockSpeed);
Wire.begin();
Parameters:
clockSpeed: CLOCK_SPEED_100KHZ or CLOCK_SPEED_400KHZ only.
Gen 2 Devices (STM32) (E-Series, Electron, Photon, and P1; does not include E404X):
On Gen 2 (STM32) including the E-Series (except E404X), Electron 1, and Photon 1, a user-specified frequency can be used. This is not supported on Gen 3 and Gen 4 devices.