Raspberry Pi Oled Clock Watch It Hear It and Feel It

by Ashwini Kumar_Sinha in Circuits > Clocks

4760 Views, 19 Favorites, 0 Comments

Raspberry Pi Oled Clock Watch It Hear It and Feel It

Screenshot_20180615-203520.png
Screenshot_20180615-203524.png
Watch it feel it listen it clock

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.

MATERIALS WE NEED TO COLLECT

IMG_20180611_104221.jpg
IMG_20180611_104231.jpg
IMG_20180613_123621.jpg
IMG_20180611_104133.jpg

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

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


PIN CONNECTION AND CLOCK PARTS FIXING

IMG_20180613_123412.jpg
IMG_20180613_110635.jpg
IMG_20180613_105713.jpg
IMG_20180613_123625.jpg
IMG_20180613_123629.jpg
IMG_20180613_123621.jpg
IMG_20180613_105700.jpg
IMG_20180613_175552.jpg
Screenshot_20180615-203546.png
IMG_20180613_124116.jpg

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

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

Congratulations Your Project Is Ready Now

Screenshot_20180615-203532.png
Screenshot_20180615-203520.png
Screenshot_20180615-203524.png
Watch it feel it listen it clock