Configuration I2C sur raspbian

  • sudo aptget install pythonsmbus
  • sudo aptget install i2ctools
  • sudo raspi-config

    • select advanced options -> I2C -> enable arm ics, yes ->
  • sudo reboot
  • sudo nano /etc/modules
    • add this to end of file :      
      • i2cbcm2708
      • i2cdev
  • sudo nano /boot/config.txt
    • add this to the end  :     dtparam=i2c1=on
  • sudo reboot

TEST I2C  at port 1 :

  • sudo i2cdetect -y 1

This will search  /dev/i2c-1 for all address. This shows that two I2C addresses are in use – 0x40 and 0x70

Adafruit PWM/Servo HAT is properly connected show up at 0x40 I2C Adress

git clone -b legacy
cd Adafruit-Raspberry-Pi-Python-Code
cd Adafruit_PWM_Servo_Driver

ls -l
sudo python

Soyez le premier à commenter

Poster un Commentaire

Votre adresse de messagerie ne sera pas publiée.