simplesi wrote:I have a bit of trouble using I2C devices and Python.
Is it just me or is are there some issues?
Are they hardware/software issues
Can they be overcome at my level (Python programmer) or do they need better libraries e.g SMBus or changes in the kernel.
or is it just me
Is this why you wanted to restart Python scripts?simplesi wrote:My main issue is getting Err 5 and having to restart my python scripts (or lots of try/excepts)
My most recent experience is with Nunchucks doing this but had problems with the likes of Adafruit matrixes
I haven't experienced any problems with basic I2C expander chips like those matrices. IO exception handling is always good practice.simplesi wrote:problems with the likes of Adafruit matrixes
You should always be programming around communication HW errors anyway - no communication is 100%simplesi wrote:This thread seems to have a lot of info on the issue
http://www.raspberrypi.org/forums/viewt ... p?p=146272
Bottom line seems to be - expect errors now and then and program around them
GPIO are prone to ESD, so you should really be protecting the code there as well!simplesi wrote:True
But I'm used to GPIO reliabity - I've had it too good for too long
Standard hysteresis stuff - see how long the pins stay in a changed state before assuming that they have actually changed state. That will help eliminate ESD spikes.simplesi wrote:Got any examples of ESD protected code