Python DS1307 library for Raspberry Pi

jBli3I just spotted an article over on SwitchDoc Labs blog for accessing the HotPi RTC using python which is pretty cool. Please note that the DS1307 on the HotPi is wired directly into the i2c port and is powered with 3.3V so the application notes regarding the pull up resistors do not apply, you should be able to just use the software immediately with your HotPi.

Here’s the example code they have on their website.

import time
import datetime
import SDL_DS1307

ds1307 = SDL_DS1307.SDL_DS1307(1, 0x68)

# Main Loop - sleeps 10 seconds, then reads and prints values of all clocks

while True:

print ""
print "Raspberry Pi=\t" + time.strftime("%Y-%m-%d %H:%M:%S")

print "DS1307=\t\t%s" % ds1307.read_datetime()


It makes me consider importing this into the HotPi-daemon in some way 🙂

Their github page is here

Grab the code and see what you can do!

HotPi Update

HotPiThe stock from the kickstarter has run dry a long time ago and we’re now shipping a slow methodical number of units via the pi hut. We’re running out of green boards now, all new boards are red, and new orders will start to come through that way.

I recently published a new page for the HotPi and the new User Manual. You can get both over on this page.

I’m going to be designing a new small board or two which will fit in to the range of HotPi products. This should take 1-2 months to get back from manufacture and I’ll keep the blog updated along the way.