Build a digital clock

From The World according to Vissie
Jump to navigation Jump to search

Setup instructions

Ok, and now that I have my clock up and running, here is my notes. This was done on OSMC

Install these files:

sudo apt-get update
sudo apt-get install python-smbus i2c-tools cron
sudo apt-get install git

If not allready, add this line to the end :

vim: /boot/config.txt
vim: /etc/modules

Depending on your distribution, you may also have a file called /etc/modprobe.d/raspi-blacklist.conf. Make sure the above 2 files in not blacklisted.

Reboot now

Your Pi has to see the device. Check this by:

ls -l /dev/i2c-1
sudo i2cdetect -y 1
git clone my py_clocks files
sudo crontab -e
@reboot sh /home/pi/bbt/ &

All the rest is old

Have a look at this site. Very good: [The old location]

Then the code:

apt-get install git
git clone

Then hopefully all works (as root or sudo):

cd Adafruit-Raspberry-Pi-Python-Code/Adafruit_LEDBackpack/

Seems things have changed a bit.

New location of the code

Also install:

sudo apt-get update
sudo apt-get install build-essential python-dev
sudo apt-get install python-smbus python-imaging

git clone

Then run:

sudo python install

To get the script to run at startup:

sudo apt-get install cron
# navigate to home directory, then to this directory, then execute python script, then back home
cd /home/vissie/adafruit
sudo python
cd /
sudo crontab -e
@reboot sh /home/pi/bbt/ &

Some notes and places to go read

What I need: 

I'll go for the green one. Girlfriend friendly....

And then the how: 

And another howto, maybe I'll get some tips there...

I might as well, while at it get: