-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRPiStuffs.txt
47 lines (37 loc) · 1.1 KB
/
RPiStuffs.txt
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
i2c
-------------------------------------------------------------------
sudo raspi-config
-> enable i2c
sudo apt-get install python-smbus python3-smbus python-dev python3-dev i2c-tools
sudo nano /boot/config.txt
dtparam=i2c=on
dtparam=i2c_baudrate=400000
dtparam=i2c_arm=on
dtparam=i2c_arm_baudrate=400000
dtparam=i2c1=on
dtparam=i2c1_baudrate=400000
core_freq=400
core_freq_min=400
-> to keep constant stable clock rate
modprobe -r i2c_bcm2708
modprobe i2c_bcm2708 baudrate=400000
modprobe i2c-dev
sudo nano /etc/modules
snd-bcm2835
i2c-dev
i2c-bcm2708
sudo nano /etc/modprobe.d/raspi-blacklist.conf
#blacklist spi-bcm2708
#blacklist i2c-bcm2708
sudo adduser pi i2c
Detect i2c devices:
ls -l /dev/*i2c*
sudo i2cdetect -y 1
sudo cat /sys/module/i2c_bcm2708/parameters/baudrate -> no longer exist
Test:
i2cget <i2c channel> <dev address> <reg_address>
--------------------------------------------------------------------
Mount dd img of RPi
--------------------------------------------------------------------
add "norecovery" to mount setting
--------------------------------------------------------------------