Skip to content

Instantly share code, notes, and snippets.

@pdp7
Created September 17, 2012 04:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdp7/3735633 to your computer and use it in GitHub Desktop.
Save pdp7/3735633 to your computer and use it in GitHub Desktop.
[timetemp] shell wrapper for python script for Raspberry Pi to display time and temp on 7-segment display
#!/bin/bash
LOG=/var/log/timetemp.log
echo tmp102 0x48 > /sys/class/i2c-adapter/i2c-0/new_device
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device
hwclock &> $LOG
date &>> $LOG
hwclock -s &>> $LOG
date &>> $LOG
/home/pi/timetemp/timetemp.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment