I've tried to scan I2C bus:
using next code, from pico official rep: [pico-rep][/https://github.com/raspberrypi/pico-exa ... bus_scan.c]
And CMakeLists.txt file looks like that:
I have to say that I did the same test on pico1 RP2040 and it works without any problems.....
Has anyone else problems with i2c initialization?
Code:
#define PICO_DEFAULT_I2C 0#define PICO_DEFAULT_I2C_SDA_PIN 4#define PICO_DEFAULT_I2C_SCL_PIN 5using next code, from pico official rep: [pico-rep][/https://github.com/raspberrypi/pico-exa ... bus_scan.c]
And CMakeLists.txt file looks like that:
Code:
set(TARGET_NAME main)add_executable(${TARGET_NAME} ${TARGET_NAME}.c )target_link_libraries(${TARGET_NAME} PRIVATE pico_stdlib hardware_spi hardware_i2c )pico_enable_stdio_usb(${TARGET_NAME} 1)pico_enable_stdio_uart(${TARGET_NAME} 1)pico_add_extra_outputs(${TARGET_NAME})I have to say that I did the same test on pico1 RP2040 and it works without any problems.....
Has anyone else problems with i2c initialization?
Statistics: Posted by redans123 — Mon Mar 24, 2025 1:09 pm