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
      dtparam=i2c_arm=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

 

https://learn.adafruit.com/adafruit-16-channel-pwm-servo-hat-for-raspberry-pi/using-the-python-library

git clone -b legacy https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code.git
cd Adafruit-Raspberry-Pi-Python-Code
cd Adafruit_PWM_Servo_Driver

ls -l
sudo python Servo_Example.py

Soyez le premier à commenter

Poster un Commentaire

Votre adresse de messagerie ne sera pas publiée.


*