Adafruit_I2C reset?

Moderators: adafruit_support_bill, adafruit

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/
Locked
User avatar
aiw
 
Posts: 20
Joined: Sat Aug 18, 2012 6:52 am

Adafruit_I2C reset?

Post by aiw »

I have the new Occidentalis v0.2 loaded on my Pi and working great with my weather radio module. The problem I'm having is if I restart the python script for some reason I have to do a complete reboot of the Pi before I can successfully access the weather radio on the I2C bus again. I've tried to remove power from the radio to see if it was the radio that needed to be reset but that had no effect. It always needs the bus reset by rebooting.

Is there an easier way to do this within the python script. For instance, if I set up a keyboard command to exit the script (sys.exit("program shutdown") can I also insert something that will reset the bus so I don't have to reboot the Pi to restart the python script.

Thanks for any help you can provide!

User avatar
aiw
 
Posts: 20
Joined: Sat Aug 18, 2012 6:52 am

Re: Adafruit_I2C reset?

Post by aiw »

Ok......I did get it to work, but not till I switched to Raspian image. I don't think Occidentalis was the issue though. I think my biggest issue was that I wasn't using the "try" and "except" with GPIO.cleanup().

I'll try with a fresh load on Occidentalis and see if that fixed it....then report back.

Locked
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/

Return to “Adafruit Raspberry Pi® accessories”