Skip to content

AnthonyKNorman/Micropython_TinyRTC

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

A simple library to read from, and write to, the cheap RTC modules you see on ebay It defaults to using pin 2 for scl and pin 16 for sda, but you can easily change these

Note: With the module that I used, there a two SMD resistors pulling up scl and sda to +5v. You need to remove these and use pullups to 3v3 with the ESP8266. On my module they are R2 and R3.

The main features are:

TinyRTC.get_time_string()

returns the time as a formatted 'hh:mm:ss' string

TinyRTC.get_date_string()

retruns the date as a formatted 'dd/mm/yyyy' string

TinyRTC.set_time(ss, mm, hh, dow, dd, MM, yy)

set the clock. After power up the clock will not run until this is executed

I have included a main.py that will show the time and date on a Nokia 5110 using my library

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages