This code should be a good starting point to understanding how you can access SMBus/I2C devices with your Pi, and getting things moving with your PWM/Servo breakout.
Before you start, you'll need to have the python smbus library installed, run apt-get install python-smbus
Downloading the Code from Github
The easiest way to get the code onto your Pi is to hook up an Ethernet cable, and clone it directly using 'git', which is installed by default on most distros. Simply run the following commands from an appropriate location (ex. "/home/pi"):$ git clone https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code.git $ cd Adafruit-Raspberry-Pi-Python-Code $ cd Adafruit_PWM_Servo_Driver
First, make certain that you have configured the right I2C address in Servo_Example.py, and that the Servo Driver is visible at that address. Refer back to the tutorial page Configuring Your Pi for I2C for instructions on verifying your I2C address and I2C bus number.
If your Servo Driver is responding to I2C, but the code is still giving you "check your I2C address" errors, then modify the code as follows: In the file Adafruit_PWM_Servo_Driver/Adafruit_PWM_Servo_Driver.py,
change
self.i2c = Adafruit_I2C(address)
to
self.i2c = Adafruit_I2C(address, 0)
for 256MB Raspberry Pi's, or...
to
self.i2c = Adafruit_I2C(address, 1)
for 512MB Raspberry Pi's
Testing the Library
Once the code has be downloaded to an appropriate folder, and you have your PWM/Servo breakout and motor properly connected, you can test it out with the following command (the driver includes a simple demo program):sudo python Servo_Example.py
Depending on if you are using a standard or continuous rotation servo, you should get results similar to the following (a continuous rotation servo is being used in this particular example):