2021-12-17 17:20:27 -06:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2022-10-07 09:48:25 -05:00
|
|
|
import subprocess
|
2021-12-17 17:20:27 -06:00
|
|
|
import time
|
|
|
|
|
|
|
|
def main():
|
2022-10-07 09:48:25 -05:00
|
|
|
subprocess.call(['hwclock', '-w', '-f', '/dev/rtc1'])
|
2021-12-17 17:20:27 -06:00
|
|
|
time.sleep(1)
|
|
|
|
|
2022-10-07 09:48:25 -05:00
|
|
|
subprocess.call(['i2cset', '-y', '0', '0x36', '0x23', '0'])
|
2021-12-17 17:20:27 -06:00
|
|
|
time.sleep(1)
|
2022-10-07 09:48:25 -05:00
|
|
|
subprocess.call(['i2cset', '-y', '0', '0x36', '0x23', '1'])
|
2021-12-17 17:20:27 -06:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|