metawatch-python/main.py

10 lines
188 B
Python
Raw Permalink Normal View History

2013-09-20 09:23:48 +00:00
import serial
2013-09-20 09:51:57 +00:00
import datetime
2013-09-20 09:23:48 +00:00
from metawatch.watch import Watch
w = Watch(serial.Serial('/dev/rfcomm0'))
print(w.get_device_type())
2013-09-20 09:51:57 +00:00
w.set_rtc(datetime.datetime.now())
2013-09-20 09:23:48 +00:00
print(w.get_rtc())