
Do try this and also you can modify this project as per your need. Its a beginner project for micro python learners. This will be a simple digital clock using micro python code. So we have connected a RTC DS13070 with Raspberry Pi PICO and LCD to display date and time.
Digital clock mini how to#

Digital clock mini code#
In the first run of the code we have to set the time as shown above. Once we have connected the components as per the connection diagram and uploaded the code, now its time to test the project. Upload Guide: Raspberry Pi PICO with Thonny IDE If you are not sure about uploading the python code files using Thonny IDE then you can follow the link below. Now we need to upload all these files in Raspberry Pi PICO. Unzip the file and open these files using Thonny IDE.
Digital clock mini download#
You can download the code from below link. Now = (year,month,date,day,hour,minute,second,0) Hour = int(input("hour (24 Hour format): ")) i2c_rtc = I2C(0,scl = Pin(1),sda = Pin(0),freq = 100000)īelow code should be uncommented only to set the time for first time in RTC and then it should be commented back again. We are also connecting the RTC module using I2C interface and hence we be using below line of code to configure it. from machine import I2C, Pinīelow line of code are used for configuring and initializing the LCD display using I2C protocol. Below are the libraries which we will be using in the entire code. Once the testing is done you can also mount these components on a plastic case.īefore we upload the code on Raspberry Pi Pico we need to understand the code. With the help of LCD display the date and time is displayed.Īfter placing all the components on a breadboard connect them as per the diagram shown below. The RTC is responsible for storing the date and time. The PICO acts as a brain of this project by running the micro python code in it. The RTC and LCD is connected with Raspberry Pi Pico using I2C protocol. It is use to save the configuration or time when setting it for first time. This RTC module is also equipped with a 32 bytes 24C32 EEPROM chip manufactured by Atmel. This battery helps the chip to maintains accurate time even if there is a power interruption. The DS1307 RTC module is equipped with a coin battery source. Although this change is negligible but in the long run it affects the time slightly. The change in temperature affects their oscillation frequency. The only problem with these external crystals are, they are very temperature sensitive. This module comes with an external 32kHz crystal for keeping accurate time. 24-hour or 12-hour format with an AM/PM indicator. The clock can operate in both the format i.e. This module can automatically adjust according to leap year. This time keeper maintains seconds, minutes, hours, day, date, month, and year information.

Using I2C protocol it is easy to interface it with different microcontrollers and development boards. It has a good feature of two-wire I2C interface. This RTC chip is built using Maxim – DS1307. The accuracy is good and works as a prefect time keeper. Things RequiredĭS1307 is a low cost real-time clock (RTC) module. It will help you to explore the possibilities of interfacing a RTC module with Pi PICO board. People who have the basic knowledge of python and electronics can build this project easily.

In this project we will be using micro python and electronics. You might have build a digital clock using Arduino, RTC and coded it with embedded C.

This is a simple DIY Digital clock with RTC DS1307 and Raspberry Pi PICO. We thought of building a digital clock using a RTC. Recently we were exploring the Raspberry Pi PICO and thought of building a simple project. Summary DIY Digital clock with RTC DS1307 and Raspberry Pi PICO
