PostNL busyness: More orders are placed than PostNL can process. Take delay into account!

Raspberry PI RTC Clock

This project is meant to drive 2 2 digit 7-segment displays to create a fully functional clock that you can use in your room or study place.

More details and further code changes can be found on github: https://github.com/Sani7/RTC-Clock 

 

The raspberry PI get's the time from the internet afther that it decodes it in to a useable number for each digit.

 

For a connection diagram please use the schematic below.

 

There are 3 main functions:

  1. SetDigits: This function gets a number from 0-9 and if the Decimal Point needs to be on or off and does this to the correct pins
  2. DisplayDigits: gets a number from 0-9 and if the Decimal Point needs to be on or off and gives it to the SetDigits function and the number of the segment that needs to light up
  3. GetTimeToDigits: This function decodes the time from the datetime function to useable numbers like segment 1: 1, segment 2: 0, segment 3: 2, segment 4: 2 and the leds need to be on.

Raspberry Pi Real Time Clock - BOM

Raspberry Pi Hat socket GPIO Header SMT 2X20 pin, Female 1x Raspberry Pi Hat Socket Riser Header 2X20 pin, Long, Female 1x 2 Digit 7-Segment Display oranje 18 pin, Orange 2x Resistor 68 ohm 500mW 10x Raspberry Pi 3 Model B Raspberry Pi single board computer 1x € 44,05 € 44,05 Male-Female 10 cm band cable 40 pieces Jumpwires to connect to the PI 1x € 2,40 € 2,40
Total: € 46,45

Raspberry Pi Real Time Clock - Library Code

Raspberry Pi Real Time Clock - Main Code

Comments