Difference between revisions of "I2C"
From Autopilot Wiki
Line 5: | Line 5: | ||
== Enabling I2C on the Raspberry Pi == | == Enabling I2C on the Raspberry Pi == | ||
− | See the " | + | See the "[[Depends on::Scripts:I2C]]" script (python -m autopilot.setup.run_script i2c) |
* Uncomment dtparam=i2c_arm=on in /boot/config.txt | * Uncomment dtparam=i2c_arm=on in /boot/config.txt |
Latest revision as of 19:57, 30 November 2021
This page is a stub!
This page contains basic information about using I2C devices on the Raspberry Pi
Enabling I2C on the Raspberry Pi
See the "Scripts:I2C" script (python -m autopilot.setup.run_script i2c)
- Uncomment dtparam=i2c_arm=on in /boot/config.txt
sudo sed -i 's/^#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/config.txt'
- Add i2c-dev to /etc/modules
sudo sed -i '$s/$/\ni2c-dev/' /etc/modules
- Enable i2c with d2param and modprobe
sudo dtparam i2c_arm=on sudo modprobe i2c-dev
- Optional: Change i2c baudrate, default is 100kHz, can go as high as 400kHz. set i2c_arm_baudrate=100000 in /boot/config.txt
sudo sed -i '$s/$/\ni2c_arm_baudrate=100000/' /boot/config.txt