-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Time standalone #2
Comments
@shawaj |
You mean have the clock come from elsewhere and just have partial updates for the time? Could the client not update the screen when the clock changes? |
Hey, this is the part that listens for MQTT Topics, previously defined.
I hope that there is a way to check for a change in the time.
|
Don't know enough about MQTT unfortunately but I'm sure there is a way.
Can you not just take that code from papirus-clock and implement something
similar?
…On 27 Mar 2017 6:02 pm, "Dominic Spatz" ***@***.***> wrote:
Hey, this is the part that listens for MQTT Topics, previously defined.
client = mqtt.Client()
client.username_pw_set(username="epaper", password="epaper")
client.on_connect = on_connect
client.on_message = on_message
client.connect("10.0.2.0", 1883, 60)
# Blocking call that processes network traffic, dispatches callbacks
# and handles reconnecting
# Other loop*() fucntions are available that give a threaded interface
# and a manual interface
try:
client.loop_forever()
I hope that there is a way to check for a change in the time.
Just like in the PaPiRus-Clock
https://github.com/PiSupply/PaPiRus/blob/master/bin/papirus-clock
while True:
while True:
now = datetime.today()
if now.second != previous_second:
break
time.sleep(0.1)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADNCuqi4ABKUDIsw1QMSB9etiYzA707Gks5rp425gaJpZM4MpnUm>
.
|
Like in
https://github.com/PiSupply/PaPiRus/blob/master/bin/papirus-clock
The text was updated successfully, but these errors were encountered: