New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

Büşra Ö.

maker_busra

@busra-ozturk · Joined January 2026

Newcomer

Hobi elektronikçisi · ev otomasyonu · Eskişehir · sahada 19 yıl

Topics
2
Replies
19
Points
0
Newcomer10 points to Member

Forum Replies Created

Viewing 4 posts – 16 through 19 (of 19 total)

Translated from Türkçe by AI ·

Don’t write it yourself in Python, the kernel already has a ready-made software I2C that does the bit-banging and correctly monitors clock stretching. That’s exactly why I moved the SCD30 over to it. /boot/config.txt (on Bookworm /boot/firmware/config.txt):

dtoverlay=i2c-gpio,bus=3,i2c_gpio_sda=23,i2c_gpio_scl=24,i2c_gpio_delay_us=2

Reboot, and check that 0x61 shows up with i2cdetect -y 3. In the code, use SMBus(3) instead of SMBus(1). Move the sensor to GPIO 23/24, and put a 4.7k pull-up to 3.3V (the internal pull-ups on the hardware I2C pins aren’t there in this setup). If you have other sensors, they can stay on bus 1.
Also, do the reading according to the sensor’s “data ready” command (0x0202); if you read while the measurement isn’t ready, it also gives nonsense. If an error still happens now and then, retry once and skip that reading; don’t send anything for a skipped reading, the last value stays in Hermetry.

Accepted solution♥ 2
Viewing 4 posts – 16 through 19 (of 19 total)