Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
I'm trying to get a Servo motor running using the tutorial.
I've changed the smbus settings for the RPi revision and keep getting the following error from line (30) that I changed in Adafruit_PWM_Servo_Driver.py
I had it installed. Here's what I get back when I run Servo_Example.py:
pi@raspberrypi ~/Adafruit-Raspberry-Pi-Python-Code/Adafruit_PWM_Servo_Driver $ sudo python Servo_Example.py
Traceback (most recent call last):
File "Servo_Example.py", line 12, in <module>
pwm = PWM(0x40, debug=True)
File "/home/pi/Adafruit-Raspberry-Pi-Python-Code/Adafruit_PWM_Servo_Driver/Adafruit_PWM_Servo_Driver.py", line 30, in __init__
self.i2c = Adafruit_I2C(address, bus=smbus.SMBus(1))
NameError: global name 'smbus' is not defined
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/