Professional Documents
Culture Documents
# install i2c-tools
echo '>>> Install i2c-tools'
if hash i2cget 2>/dev/null; then
echo 'Seems i2c-tools is installed already, skip this step.'
else
apt-get install -y i2c-tools
fi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# file: setup_i2c.sh
#
# This script will enable I2C and install i2c-tools on your Raspberry Pi
#
# install i2c-tools
echo '>>> Install i2c-tools'
if hash i2cget 2>/dev/null; then
echo 'Seems i2c-tools is installed already, skip this step.'
else
apt-get install -y i2c-tools
fi