switchdoclabs / RTC_SDL_DS1307

Raspberry PI Python Library for DS1307
6 stars 11 forks source link

module not found #3

Open JananiVJ opened 7 years ago

JananiVJ commented 7 years ago

Hello, Thank you for the library. I am using a ds3231 with raspberry pi 2. When I run the testSDL_DS3231.py , I get the following in my terminal.

pi@PC-17-0302:~/Documents/examples/opcn2/RTC_SDL_DS3231 $ python testSDL_DS3231.py

Test SDL_DS3231 Version 1.0 - SwitchDoc Labs

Program Started at:2017-06-13 14:58:38

Traceback (most recent call last): File "testSDL_DS3231.py", line 31, in ds3231.write_now() File "/home/pi/Documents/examples/opcn2/RTC_SDL_DS3231/SDL_DS3231.py", line 222, in write_now self.write_datetime(datetime.now()) File "/home/pi/Documents/examples/opcn2/RTC_SDL_DS3231/SDL_DS3231.py", line 217, in write_datetime dt.isoweekday(), dt.day, dt.month, dt.year % 100) File "/home/pi/Documents/examples/opcn2/RTC_SDL_DS3231/SDL_DS3231.py", line 180, in write_all self._write(self._REG_SECONDS, seconds_reg) File "/home/pi/Documents/examples/opcn2/RTC_SDL_DS3231/SDL_DS3231.py", line 97, in _write self._bus.write_byte_data(self._addr, register, data) IOError: [Errno 16] Device or resource busy

When I run it on spyder, it says no SDL_DS3231 module found.

Where am I wrong. Please let me know how to correct this. Thank you.

switchdoclabs commented 7 years ago

Try

sudo python testSDL_DS3231.py