Just a few things that I have found over the last few days that may help make your products easier for people to use.
1. Change'Adafruit_i2c.py' to take a 1 or 0 for the i2c driver so that smbus is not needed in externial code:
Original:
def __init__(self, address, bus=smbus.SMBus(0), debug=False):
self.address = address
self.bus = bus
self.debug = debug
2. New:
def __init__(self, address, bus=1, debug=False): # rev 2
self.address = address
self.bus =smbus.SMBus(bus)
self.debug = debug
3. Servo demo:
a. You say in the tutorial that if you have rev 2 boards, that you must change:
self.i2c = Adafruit_I2C(address)
to
self.i2c = Adafruit_I2C(address, bus=smbus.SMBus(1))
In order for the tutorial to work 'import smbus' must also be added to the
Adafruit_PWM_Servo_Driver/Adafruit_PWM_Servo_Driver.py
Should be modified as per 1. above
b. ^C should shut down the demo, not leave it running! Haven't dug into the code yet.
4. I2c.py:
a. Adafruit_I2C.py file should be the same in:
/Adafruit-Raspberry-Pi-Python-Code/Adafruit_I2C
as in:
/Adafruit-Raspberry-Pi-Python-Code/Adafruit_BMP085(and elsewhere, and it's not!)
should use the same base file.
Seriously screws up the tabs!!!!!
tutorials/software
Moderators: adafruit_support_bill, adafruit
Forum rules
Get help, and assist others in with open source kits and running a business! Do not ask for legal advice or for consulting services in this forum, only general biz questions!
Get help, and assist others in with open source kits and running a business! Do not ask for legal advice or for consulting services in this forum, only general biz questions!
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: tutorials/software
Thanks for the feedback! We are always trying to improve.
The best way to ensure this gets onto the author's to-do list is to post it in the comments & corrections link on the left of the tutorial page.
The best way to ensure this gets onto the author's to-do list is to post it in the comments & corrections link on the left of the tutorial page.
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: tutorials/software
we're updating the i2c sublibrary to auto-detect rev 1 or rev 2 shortly -
Forum rules
Get help, and assist others in with open source kits and running a business! Do not ask for legal advice or for consulting services in this forum, only general biz questions!
Get help, and assist others in with open source kits and running a business! Do not ask for legal advice or for consulting services in this forum, only general biz questions!