From 88bf000942e2f2f503b11617accbb87905d955e3 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht <31932013+gschorcht@users.noreply.github.com> Date: Fri, 15 Sep 2017 14:57:51 +0200 Subject: [PATCH] GPIO used as I2C SCL signal changed GPIO used as I2C SCL signal for second I2C bus was changed from GPIO16 to GPIO12 in this example. Reason is that GPIO16 is slower than other GPIOs. --- .../sht3x_callback_two_sensors/sht3x_callback_two_sensors.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/sht3x/sht3x_callback_two_sensors/sht3x_callback_two_sensors.c b/examples/sht3x/sht3x_callback_two_sensors/sht3x_callback_two_sensors.c index 05ad530..2433e5b 100644 --- a/examples/sht3x/sht3x_callback_two_sensors/sht3x_callback_two_sensors.c +++ b/examples/sht3x/sht3x_callback_two_sensors/sht3x_callback_two_sensors.c @@ -18,7 +18,7 @@ #define I2C_1_SDA_PIN GPIO_ID_PIN((4)) #define I2C_2_BUS 1 -#define I2C_2_SCL_PIN GPIO_ID_PIN((16)) +#define I2C_2_SCL_PIN GPIO_ID_PIN((12)) #define I2C_2_SDA_PIN GPIO_ID_PIN((14)) #define SHT3x_ADDR_1 0x44 @@ -66,8 +66,8 @@ void user_init(void) sht3x_init(); // Create sensors - sensor1 = sht3x_create_sensor (I2C_1_BUS, SHT3x_ADDR_1); - sensor2 = sht3x_create_sensor (I2C_2_BUS, SHT3x_ADDR_2); + sensor1 = sht3x_create_sensor (I2C_2_BUS, SHT3x_ADDR_1); + sensor2 = sht3x_create_sensor (I2C_1_BUS, SHT3x_ADDR_2); // Set the callback function sht3x_set_callback_function (sensor1, &my_callback_function);