www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
14. CONFIGURATION OF THE INTERFACES
(Before you perform the API codes which we oer, you should activate the
drivers of the interface accordingly. In the ready to use system-image file are
I2C as well as SPI active by default. But the serial port is still in the console
debug function.)
To allow the I2C function, enter the following command to configurate your
Raspberry Pi:
sudo raspi-config
Choose
Interfacing Options → I2C
→
yes
to start the drivers. Aer that, you
must modify the configuration file. Enter the following command to open
these:
sudo nano /etc/modules
Add these lines to the configuration file:
Press the keys Strg+X to leave the menu and enter Y to save the adjustments.
Aer that restart the module that the settings come into eect.
The serail port of the Raspberry Pi is set on the serial console debug function
by default. If you want to use the serial port as I/O, you must modify the
settings of the Raspberry Pi and activate the serial function. If the console
debug function is disabled, you can not reach the Raspberry console via the
serial port. If you want to control the Raspberry Pi again via the serial
interface, you must enable this function.
Choose
Interfacing Options → Serial
. Select the option NO to disable the serial debug function. You can activate the serial port aerwards with YES. You
must restart the device so that your settings are valid. Now, you can use the
port for the serial communication.
The serial port of the Raspberry Pi model B is bnot useable because pin 14
and pin 15 are connected with a own Bluetooth module.
i2c-bcm2708
i2c-dev
sudo raspi-config
To activate the SPI function, enter the following command into the console:
sudo raspi-config
Choose
Interfacing Options → SPI
→
yes
, to activate the SPI core drivers.
15. DOWNLOAD OF THE CODE EXAMPLES
To alleviate the access of our code examples, naturally you can download
them. For that, follow the link to get our download package.
https://joy-it.net/files/files/Produkte/RB-Explorer700/Explorer700-1.zip