Exemplo n.º 1
0
 def Service(self):
     if (self.last_update is None):
         self.last_update = time.time()
     current_time = time.time()
     elapsed_time = current_time - self.last_update
     if (elapsed_time >= self.update_interval):
         update_time_msg = Message.SetSystemTime()
         self.led_sign.SendMessage(update_time_msg)
         time.sleep(1)
         screen_msg = self.UpdateText()
         self.led_sign.SendMessage(screen_msg)
         time.sleep(1)
         self.last_update = current_time
Exemplo n.º 2
0
#!/usr/bin/env python
# vim: set ts=2 expandtab:

import serial
from JetFileII import Message

from config import PORT
from config import BAUD_RATE

msg = Message.SetSystemTime()

print msg.encode('hex')

#port = '/dev/ttyUSB0'
#baudRate = 19200
ser = serial.Serial(PORT, BAUD_RATE)
x = ser.write(msg)
ser.close()