Initial fork + minor fixes for BMP085 (mBar output) + shell scripts for ADS1115 and...
[i2c-telemetry.git] / gethwclock
1 #!/bin/sh
2
3 I2CBUS=0
4 I2CADDR=0x68
5
6 sec=`i2cget -y $I2CBUS $I2CADDR 0`
7 min=`i2cget -y $I2CBUS $I2CADDR 1`
8 hour=`i2cget -y $I2CBUS $I2CADDR 2`
9 day=`i2cget -y $I2CBUS $I2CADDR 4`
10 month=`i2cget -y $I2CBUS $I2CADDR 5`
11 year=`i2cget -y $I2CBUS $I2CADDR 6`
12
13 echo 20${year:2:2}-${month:2:2}-${day:2:2} ${hour:2:2}:${min:2:2}:${sec:2:2}