534
edits
m (→I2C Buses Activation: Formating Console output with shell-session syntax highlighting) |
|||
| Line 21: | Line 21: | ||
}} | }} | ||
== I2C Buses Activation == | == I2C Buses Activation == | ||
You need to activate I2C buses | You need to activate I2C buses with the Raspberry Configuration Tool.<br /> | ||
<syntaxhighlight lang="shell-session"> | <syntaxhighlight lang="shell-session"> | ||
pi@raspberrypi:~ $ | pi@raspberrypi:~ $ sudo raspi-config | ||
┌────────────┤ Raspberry Pi Software Configuration Tool (raspi-config) ├───────────────┐ | |||
│ │ | |||
│ 1 Change User Password Change password for the default user (pi) │ | |||
│ 2 Hostname Set the visible name for this Pi on a network │ | |||
│ 3 Boot Options Configure options for start-up │ | |||
│ 4 Localisation Options Set up language and regional settings to match your location │ | |||
│ 5 Interfacing Options Configure connections to peripherals │ | |||
│ 6 Overclock Configure overclocking for your Pi │ | |||
│ 7 Advanced Options Configure advanced settings │ | |||
│ 8 Update Update this tool to the latest version │ | |||
│ 9 About raspi-config Information about this configuration tool │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ <Select> <Finish> │ | |||
│ │ | |||
└──────────────────────────────────────────────────────────────────────────────────────┘ | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Select Option '''5 Interfacing Options'''. | |||
<syntaxhighlight lang="shell-session"> | |||
┌────────────┤ Raspberry Pi Software Configuration Tool (raspi-config) ├───────────────┐ | |||
│ │ | |||
│ P1 Camera Enable/Disable connection to the Raspberry Pi Camera │ | |||
│ P2 SSH Enable/Disable remote command line access to your Pi using SSH │ | |||
│ P3 VNC Enable/Disable graphical remote access to your Pi using RealVNC │ | |||
│ P4 SPI Enable/Disable automatic loading of SPI kernel module │ | |||
│ P5 I2C Enable/Disable automatic loading of I2C kernel module │ | |||
│ P6 Serial Enable/Disable shell and kernel messages on the serial connection │ | |||
│ P7 1-Wire Enable/Disable one-wire interface │ | |||
│ P8 Remote GPIO Enable/Disable remote access to GPIO pins │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ <Select> <Back> │ | |||
│ │ | |||
└──────────────────────────────────────────────────────────────────────────────────────┘ | |||
</syntaxhighlight> | |||
Select '''P5 I2C''' | |||
<syntaxhighlight lang="shell-session"> | |||
┌──────────────────────────────────────────────────────────┐ | |||
│ │ | |||
│ Would you like the ARM I2C interface to be enabled? │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ <Yes> <No> │ | |||
│ │ | |||
└──────────────────────────────────────────────────────────┘ | |||
</syntaxhighlight> | |||
Answer '''yes''' | |||
<syntaxhighlight lang="shell-session"> | |||
┌──────────────────────────────────────────────────────────┐ | |||
│ │ | |||
│ The ARM I2C interface is enabled │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ <Ok> │ | |||
│ │ | |||
└──────────────────────────────────────────────────────────┘ | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="shell-session"> | |||
┌────────────┤ Raspberry Pi Software Configuration Tool (raspi-config) ├───────────────┐ | |||
│ │ | |||
│ P1 Camera Enable/Disable connection to the Raspberry Pi Camera │ | |||
│ P2 SSH Enable/Disable remote command line access to your Pi using SSH │ | |||
│ P3 VNC Enable/Disable graphical remote access to your Pi using RealVNC │ | |||
│ P4 SPI Enable/Disable automatic loading of SPI kernel module │ | |||
│ P5 I2C Enable/Disable automatic loading of I2C kernel module │ | |||
│ P6 Serial Enable/Disable shell and kernel messages on the serial connection │ | |||
│ P7 1-Wire Enable/Disable one-wire interface │ | |||
│ P8 Remote GPIO Enable/Disable remote access to GPIO pins │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ <Select> <Back> │ | |||
│ │ | |||
└──────────────────────────────────────────────────────────────────────────────────────┘ | |||
</syntaxhighlight> | |||
Now to return to the main menu, select '''Back''' | |||
<syntaxhighlight lang="shell-session"> | |||
┌────────────┤ Raspberry Pi Software Configuration Tool (raspi-config) ├───────────────┐ | |||
│ │ | |||
│ 1 Change User Password Change password for the default user (pi) │ | |||
│ 2 Hostname Set the visible name for this Pi on a network │ | |||
│ 3 Boot Options Configure options for start-up │ | |||
│ 4 Localisation Options Set up language and regional settings to match your location │ | |||
│ 5 Interfacing Options Configure connections to peripherals │ | |||
│ 6 Overclock Configure overclocking for your Pi │ | |||
│ 7 Advanced Options Configure advanced settings │ | |||
│ 8 Update Update this tool to the latest version │ | |||
│ 9 About raspi-config Information about this configuration tool │ | |||
│ │ | |||
│ │ | |||
│ │ | |||
│ <Select> <Finish> │ | |||
│ │ | |||
└──────────────────────────────────────────────────────────────────────────────────────┘ | |||
</syntaxhighlight> | |||
Then the '''Finish''' button to end the configuration session. | |||
Now the I2C buses are activated on the Raspberry. | |||
edits