GithubHelp home page GithubHelp logo

rpiclock's Introduction

Raspberry Pi clock

A clock + weather display using a Raspberry Pi with a 3.5" LCD display retrofitted inside an Areaware iPhone Dock. This hack require to hollow out the dock since it's a massive block of wood. The "iPhone" like front panel is composed of a laser cut plexiglass with the back painted black leaving a window for the display, and finally an aluminum band carefully bended and glued with epoxy.

Instructions (brain dump)

Tontec 3.5โ€ Screen Driver Install Instructions - Model: MZ61581

Enable SPI and set overlay for Tontec MZ61581 Screen

sudo vim /boot/config.txt

And add these lines to the bottom

dtparam=spi=on
dtoverlay=mz61581

Then save and reboot

Set Tontec 3.5 Screen as the default display instead of HDMI

Here we will change the default output display from HDMI to Tontec Screen

sudo apt install xserver-xorg-video-fbturbo

sudo vim /usr/share/X11/xorg.conf.d/99-fbturbo.conf

Change
          Option          "fbdev" "/dev/fb0"
To
          Option          "fbdev" "/dev/fb1"

Edit cmdline.txt

Here we will enable Tontec Screen to display during the booting process

sudo vim /boot/cmdline.txt

Add fbcon=map:10 at the end of current line. (No need to start a new line)

Autostart

> cat .bash_profile 
if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ]
then
  startx
fi


> cat .xinitrc 
#!/usr/bin/env sh
xset s off
xset -dpms 
xset s noblank

while true; do
  /usr/local/bin/rpiclock >> ~/rpiclock.log 2>&1
done;

Backlight

Turn off backlight

echo 1 | sudo tee /sys/class/backlight/*/bl_power

Turn on backlight

echo 0 | sudo tee /sys/class/backlight/*/bl_power

Crontab

sudo crontab -e
00 23 * * * echo 1 | sudo tee /sys/class/backlight/*/bl_power
00 07 * * * echo 0 | sudo tee /sys/class/backlight/*/bl_power

Firmware

sudo rpi-update e1050e94821a70b2e4c72b318d6c6c968552e9a2

rpiclock's People

Contributors

mojocorp avatar

Stargazers

Tobias Liebig avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.