I have 2 devices using I2C: BH1750 and LCD16x2. I used 2 pins PB6 and pB7 for BH1750 and it worked but when i use 2 pins PB8 and PB9 for LCD, it didn’t. I have been searching and don’t know how to enable multiple I2C channels on STM32F103C8T6 when using PlatformIO framework Arduino. Can someone help me plz, I am now really running out of time and patience…
Here is my entire of my platform.ini in my project:
[env:genericSTM32F103C8]
platform = ststm32
board = genericSTM32F103C8
framework = arduino
debug_tool = stlink
monitor_speed = 115200
upload_protocol = stlink
lib_deps =
claws/BH1750@^1.3.0
adafruit/DHT sensor library@^1.4.4
marcoschwartz/LiquidCrystal_I2C@^1.1.4
adafruit/Adafruit Unified Sensor@^1.1.9
bblanchon/ArduinoJson@^6.21.0
stm32duino/STM32duino FreeRTOS@^10.3.1
bblanchon/ArduinoJson@^6.21.0
khoih-prog/STM32_PWM @ ^1.0.1
khoih-prog/STM32_PWM @ 1.0.1