I2C on the Raspberry Pi - HOW TO use I2C with Python

preview_player
Показать описание
If you want to know how to set up the I2C interface of your Raspberry Pi then this video is for you! We explain how to connect and program I2C devices with your Raspberry Pi.

If you want to know more about the I2C interface, check out our blog

Here are the commands shown in the video
sudo raspi-config
i2cdetect -y 1
mkdir i2c-example && cd i2c-example
sudo python3 -m venv i2c
source i2c/bin/activate
sudo ~/i2c-example/i2c/bin/pip3 install Adafruit-Blinka
pip3 list

Check out our GitHub repository

BME68X API GitHub Repository

You can pick up the BME688 Breakout Board and your other Raspberry Pi needs at our store

The easiest way to use your BME688 Breakout Board is to use PiCockpit, our Web-Interface for the Raspberry Pi
Рекомендации по теме
Комментарии
Автор

Thanks. Using virtual environment is good idea !

Eddie.Mootsen
Автор

At 2:43 Where is the adress "0x77" displayed? It shows a 77 at 7 horizontal and 70 vertical. It shows blanks on 0 - 7 horizontal at 00 vertial, and shows "--" for everything elase

insylem
Автор

how to i2c connect a bme688 dev kit 8x board with a pi?

constchoven
Автор

Hi, thank you for this tutorial. For some reason, i can detect the I2C slave (made from RP2040) with i2cdetect -y 1 on Raspberry pi 3 B V1.2 before i run the script. After this, the I2C gets probably blocked and when i try to run i2cdetect -y 1 again, it gets ultra slow and nothing is detected - the journalctl kernel says "i2ctransfer timed out". Do you have any idea what is going on? Thank you very much in advance, keep going and building the cahnnel. Best wishes and Happy New year to you! =)

vaclavnemec
Автор

Thanks for showing how to enable I2C. I'm getting *No Hardware I2C on (scl, sda)=(3, 2)* error even considering I connected everything correctly and the tutorial doesn't explain that I have to enable I2C in the config of the device.

KulaGGin
Автор

I've been constantly getting this error again and again
{ERROR: Could not find a version that satisfies the requirement Ada
ERROR: No matching distribution found for Ada} What should I do??

devdass