Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
tutorials:activate_gpiozero_and_i2c_pins_in_raspberry_pi_3b_with_ubuntu_18.04.3_server_arm64 [2020/02/03 16:15]
lyannicelliv [Activating GPIOzero Pins]
tutorials:activate_gpiozero_and_i2c_pins_in_raspberry_pi_3b_with_ubuntu_18.04.3_server_arm64 [2020/02/03 16:16] (current)
lyannicelliv [Activating I2C and SPI pins]
Line 49: Line 49:
  
 Is necessary to create some configuration files: Is necessary to create some configuration files:
 +<code bash>
   sudo touch /​etc/​modprobe.d/​raspi-blacklist.conf   sudo touch /​etc/​modprobe.d/​raspi-blacklist.conf
   emacs /​etc/​modprobe.d/​raspi-blacklist.conf   emacs /​etc/​modprobe.d/​raspi-blacklist.conf
-  ​+</​code>​
 Fill file with the following information:​ Fill file with the following information:​
 +<code bash>
   # blacklist spi and i2c by default (many users don't need them)   # blacklist spi and i2c by default (many users don't need them)
  
   blacklist spi-bcm2708   blacklist spi-bcm2708
   blacklist i2c-bcm2708   blacklist i2c-bcm2708
-  ​+</​code>​
 For the second file, called /​etc/​modules,​ add at the end of the file this lines and should look like this: For the second file, called /​etc/​modules,​ add at the end of the file this lines and should look like this:
 +<code bash>
   # /​etc/​modules:​ kernel modules to load at boot time.   # /​etc/​modules:​ kernel modules to load at boot time.
   #   #
Line 68: Line 69:
   snd-bcm2835   snd-bcm2835
   i2c-dev   i2c-dev
 +</​code>​
 Then, run the following commands: Then, run the following commands:
 +<code bash>
   sudo apt  install i2c-tools   sudo apt  install i2c-tools
   sudo apt  install python-smbus   sudo apt  install python-smbus
   sudo adduser pi i2c   sudo adduser pi i2c
   sudo reboot   sudo reboot
 +</​code>​
 You can run sudo i2cdetect -y 0, to verify the address of your dispositive already connected to your Raspberry Pi.  You can run sudo i2cdetect -y 0, to verify the address of your dispositive already connected to your Raspberry Pi. 
  
  • tutorials/activate_gpiozero_and_i2c_pins_in_raspberry_pi_3b_with_ubuntu_18.04.3_server_arm64.txt
  • Last modified: 2020/02/03 16:16
  • by lyannicelliv