Introduction: Raspberry Pi Oled Clock Watch It Hear It and Feel It

About: scientist,Robot lover

This is a smart clock that shows time on a OLED display and also you can hear time at different time interval that is help full for blind and It also change the led color with time like light in dusk light in evening goes orange to yellow and like that .This project is very exiting we are going to use OLed with it and very fun with it.

Step 1: MATERIALS WE NEED TO COLLECT

MATERIAL WE FIRST NEED TO COLLECT

  • 2 boxes as like in pic or you can pick according to your choice
  • Raspberry pi any version(I have used A+)
  • Speaker with amplifier
  • Battery or mini power bank
  • O LED display(I have used OLED ssd1063)
  • R.G.B led
  • Glue and Hot glue
  • Cardboard white paper or any thick paper

Step 2: SOFTWERE NEEDED

  • Rasbiam or Noobs on Raspberry pi
  • Python Gpio library installed in pi
  • Python ssd oled Library

Install Ssd OLed link from given link oled liberary link

https://github.com/adafruit/Adafruit_Python_SSD130...

Get font used in the project from link below

https://github.com/xxlukas42/RPI_SSD1306


Step 3: PIN CONNECTION AND CLOCK PARTS FIXING

Attach and fix the O.Led display and R.G.B led in box as illustrated in pics.

you can attach and fix Oled display according to you own design

PIN CONNECTION OF O.LED DISPLAY OF RASPBERRY

Raspberry pi Board pin O.led Display

Pin3 -------------- ---------- - ->SDA

pin5 ------------------------------->SCL

GND------------------------------>GND

3V---------------------------------->VCC


RGB LED to PI CONNECTION


comman +ve pin to 3v raspberry pi

Red--------------->35

Green------------->33

Blue --------------->37

Step 4:

PYTHON CODE LINK

https://github.com/ASHWINISINHA/pi-oled-intelligen...

Downlode the Python scripts from the above link and run the run1.py file from Terminal for random color clock

Run the run2.py from terminal for LED color according to time

import time
import os

time import Adafruit_GPIO.SPI as SPI i

mport Adafruit_SSD1306 from time import gmtime, strftime

from PIL import Image

from PIL import ImageDraw

from PIL import ImageFont

# Raspberry Pi pin configuration:

RST = 24 # Note the following are only used with

SPI: DC = 23 SPI_PORT = 0 SPI_DEVICE = 0

showtime = strftime("%a %d %b %Y time %X second",gmtime())

def female(text):

os.system("espeak ' " + text + " ' ")

female(showtime) # 128x32 display with hardware I2C: #

disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST)

disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST) disp.begin()

# Clear display. disp.clear() disp.display()

width = disp.width height = disp.height image = Image.new('1', (width, height))

# Get drawing object to draw on image. draw = ImageDraw.Draw(image)

# Draw a black filled box to clear the image. draw.rectangle((0,0,width,height), outline=0, fill=0)

# Draw some shapes. # First define some constants to allow easy resizing of shapes. padding = 2 shape_width = 20 top = padding bottom = height-padding # Move left to right keeping track of the current x position for drawing shapes. x = padding # Draw an ellipse.

# Load default font. font = ImageFont.load_default() font = ImageFont.truetype('Montserrat-Light.ttf', 14) font2 = ImageFont.truetype('Montserrat-Light.ttf', 20) font_text_big = ImageFont.truetype('Montserrat-Medium.ttf', 30)

while True: draw.rectangle((0,0,width,height), outline=0, fill=0) draw.text((x, top), str(strftime("%a %d %b %Y ",gmtime())), font=font, fill=455) draw.text((x, top+39), str(strftime("%a %d ",gmtime())), font=font2, fill=455) draw.text((x, top+12), str(strftime("%X",gmtime())), font=font_text_big, fill=455) showtime = strftime("%a %d %b %Y time %X second",gmtime()) def female(text): os.system("espeak ' " + text + " ' ") female(showtime) disp.image(image) disp.display() time.sleep(1)

Downlode full python script from here

https://github.com/ASHWINISINHA/pi-oled-intelligen...

https://github.com/ASHWINISINHA/pi-oled-intelligent-clock

Step 5: Congratulations Your Project Is Ready Now