Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8013

General • I can't detect I2C devices on pico2 RP2350

$
0
0
I've tried to scan I2C bus:

Code:

#define PICO_DEFAULT_I2C 0#define PICO_DEFAULT_I2C_SDA_PIN 4#define PICO_DEFAULT_I2C_SCL_PIN 5

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:

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



Viewing all articles
Browse latest Browse all 8013

Trending Articles