fix i2c cannt auto load on raspbian lite os
This commit is contained in:
parent
e2266a2791
commit
b462e8a724
2 changed files with 10 additions and 2 deletions
|
@ -19,8 +19,8 @@ ver="0.3"
|
|||
marker="0.0.0"
|
||||
|
||||
apt update
|
||||
apt-get -y install raspberrypi-kernel-headers raspberrypi-kernel
|
||||
apt-get -y install dkms
|
||||
apt-get -y install raspberrypi-kernel-headers raspberrypi-kernel
|
||||
apt-get -y install dkms git i2c-tools
|
||||
|
||||
# locate currently installed kernels (may be different to running kernel if
|
||||
# it's just been updated)
|
||||
|
|
|
@ -22,6 +22,14 @@
|
|||
|
||||
set -x
|
||||
exec 1>/var/log/$(basename $0).log 2>&1
|
||||
#enable i2c interface
|
||||
dtparam i2c_arm=on
|
||||
modprobe i2c-dev
|
||||
|
||||
#enable spi interface
|
||||
dtparam spi=on
|
||||
sleep 1
|
||||
|
||||
|
||||
|
||||
is_1a=$(i2cdetect -y 1 0x1a 0x1a | grep 1a | awk '{print $2}')
|
||||
|
|
Loading…
Reference in a new issue