luma.oled icon indicating copy to clipboard operation
luma.oled copied to clipboard

sys_info.py: error: I2C device not found on address: 0x3C.But i2c can detected on pi 4b arm64

Open KWMaster opened this issue 1 year ago • 0 comments

Type of Raspberry Pi

Raspberry Pi 4 Model B Rev 1.5 BCM2835

Linux Kernel version

Linux kmaster 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

Expected behaviour

Actual behaviour

When I follow the office document to install all configuration.I can use i2cdetect oled.But run the example console the error: sys_info.py: error: I2C device not found on address: 0x3C. I hava 2 128x64 oled and one on ubuntu pi is ok another on this raspbian arm64.When I switch 2 oled on ubuntu one every is ok.Here is the detail console for raspbian arm64(I add one line print(args) in demo_opts.py#line51, python version is 3.9):

root@kmaster:/home/kmaster/luma.examples/examples# i2cdetect -l
i2c-20  i2c             fef04500.i2c                            I2C adapter
i2c-1   i2c             bcm2835 (i2c@7e804000)                  I2C adapter
i2c-21  i2c             fef09500.i2c                            I2C adapter
root@kmaster:/home/kmaster/luma.examples/examples# python3 sys_info.py
Namespace(config=None, display='ssd1306', width=128, height=64, rotate=0, interface='i2c', i2c_port=1, i2c_address='0x3C', spi_port=0, spi_device=0, spi_bus_speed=8000000, spi_transfer_size=4096, spi_cs_high=False, ftdi_device='ftdi://::/1', framebuffer_device='/dev/fd0', gpio=None, gpio_mode=None, gpio_data_command=24, gpio_chip_select=24, gpio_reset=25, gpio_backlight=18, gpio_reset_hold_time=0, gpio_reset_release_time=0, block_orientation=0, mode='RGB', framebuffer='diff_to_previous', num_segments=4, bgr=False, inverse=False, h_offset=0, v_offset=0, backlight_active='low', debug=False, transform='scale2x', scale=2, duration=0.01, loop=0, max_frames=None)
usage: sys_info.py [-h] [--config CONFIG] [--display DISPLAY] [--width WIDTH] [--height HEIGHT] [--rotate ROTATION] [--interface INTERFACE]
                   [--i2c-port I2C_PORT] [--i2c-address I2C_ADDRESS] [--spi-port SPI_PORT] [--spi-device SPI_DEVICE] [--spi-bus-speed SPI_BUS_SPEED]
                   [--spi-transfer-size SPI_TRANSFER_SIZE] [--spi-cs-high SPI_CS_HIGH] [--ftdi-device FTDI_DEVICE] [--framebuffer-device FRAMEBUFFER_DEVICE]
                   [--gpio GPIO] [--gpio-mode GPIO_MODE] [--gpio-data-command GPIO_DATA_COMMAND] [--gpio-chip-select GPIO_CHIP_SELECT]
                   [--gpio-reset GPIO_RESET] [--gpio-backlight GPIO_BACKLIGHT] [--gpio-reset-hold-time GPIO_RESET_HOLD_TIME]
                   [--gpio-reset-release-time GPIO_RESET_RELEASE_TIME] [--block-orientation ORIENTATION] [--mode MODE] [--framebuffer FRAMEBUFFER]
                   [--num-segments NUM_SEGMENTS] [--bgr] [--inverse] [--h-offset H_OFFSET] [--v-offset V_OFFSET] [--backlight-active VALUE] [--debug]
                   [--transform TRANSFORM] [--scale SCALE] [--duration DURATION] [--loop LOOP] [--max-frames MAX_FRAMES]
sys_info.py: error: I2C device not found on address: 0x3C
root@kmaster:/home/kmaster/luma.examples/examples# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

KWMaster avatar May 30 '23 15:05 KWMaster