me-no-dev / RasPiArduino

Arduino Framework for RaspberryPI
333 stars 75 forks source link

after running sketch I2C bus become no available for Raspberry system #91

Open Barabba11 opened 6 years ago

Barabba11 commented 6 years ago

Hi, I hope someone may help with this issue.

I have a RTC and I want Raspbian keep it update automatically polling NTP, if I run a sketch 24/24h that uses I2C bus I dubt it can.. so I need a way to make it free. For example when I run a sketch that contains wire.begin(); and I exit from it by control+c I can't more execute i2cdetect -y or force RTC update, I need to go to raspi-config and disable and re enable the I2C bus to have it succesfully. I tried also with a sketch containing wire.begin(); and after a wire.end(); but doesn't help. Maybe because I'm using control+c? how can I soft exit from a sketch? if I use a wire.end(); and execute from the sketch a unShellCommand() to update RTC will it work? Thank you