Open SamSkjord opened 1 month ago
@SamSkjord Using raspberry pi 3b+ and bookworm (6.6.31+rpt-rpi-v8), I don't see an i2c-22
to symlink? Also, such a symlink doesn't persist after a reboot.
$ ls -l /dev/i2c-*
crw-rw---- 1 root i2c 89, 11 Jul 25 17:46 /dev/i2c-11
crw-rw---- 1 root i2c 89, 2 Jul 25 17:46 /dev/i2c-2
Maybe it's 11? I haven't connected an i2c device yet but outputs:
$ i2cdetect -y 11
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- UU -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
$ i2cdetect -y 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Update: after connecting an DS3231 it shows up (68):
$ sudo i2cdetect -y 11
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- UU -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
but I can't find a way to use /dev/i2c-11
with the i2c-rtc
ds3231 overlay...
Update 2: run this /usr/bin/setup-ds3231.sh
script at boot to read the time from the RTC and set it systemwide:
#!/bin/bash
echo ds3231 0x68 | sudo tee /sys/class/i2c-adapter/i2c-11/new_device
sleep 1s
# set the system time from the RTC
sudo hwclock -s
Luckily it doesn't mess with the display or touch.
$ sudo i2cdetect -y 11
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- UU -- --
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Describe the bug
Current bash command to create a symlink for the i2c output header is outdated,
sudo ln -s /dev/i2c-22 /dev/i2c-1
works correctlyTo Reproduce
https://learn.pimoroni.com/article/getting-started-with-hyperpixel-4#using-the-alternate-i2c-interface-on-hyperpixel-4-0-for-advanced-users
Your HyperPixel 4
Let us know which HyperPixel 4 board you're using. Note: if you're having a problem with the original HyperPixel you should go to: https://github.com/pimoroni/hyperpixel
Your Raspberry Pi
Pi4b on Debian GNU/Linux 12 (bookworm)
i2cdetect -y 1
sudo ln -s /dev/i2c-22 /dev/i2c-1
i2cdetect -y 1