Difference between revisions of "GPIO"

From Tuxamito
Jump to: navigation, search
(I2C)
 
(One intermediate revision by the same user not shown)
Line 30: Line 30:
 
<pre>
 
<pre>
 
sudo nano /etc/modprobe.d/raspi-blacklist.conf
 
sudo nano /etc/modprobe.d/raspi-blacklist.conf
 +
</pre>
 +
 +
<pre>
 +
pi@raspberrypi /dev $ ls -la i2c*
 +
crw-rw---T 1 root i2c 89, 1 Nov  3 18:14 i2c-1
 
</pre>
 
</pre>
  
Line 38: Line 43:
 
<pre>
 
<pre>
 
sudo i2cdetect -y 0
 
sudo i2cdetect -y 0
 +
</pre>
 +
 +
<pre>
 +
/etc/group
 +
i2c:x:111:
 +
</pre>
 +
 +
<pre>
 +
i2c:x:111:pi
 
</pre>
 
</pre>
  

Latest revision as of 16:49, 6 November 2014

GPIO

Raspberrypi-pinout.jpg

I2C

i2c-dev
i2c-bcm2708 
sudo nano /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

snd-bcm2835
i2c-dev
i2c-bcm2708 

in case blacklisted

sudo nano /etc/modprobe.d/raspi-blacklist.conf
pi@raspberrypi /dev $ ls -la i2c*
crw-rw---T 1 root i2c 89, 1 Nov  3 18:14 i2c-1
sudo i2cdetect -y 1
sudo i2cdetect -y 0
/etc/group
i2c:x:111:
i2c:x:111:pi
pi@raspberrypi ~ $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- 39 -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 

SPI