Search found 22 matches
- Thu Dec 07, 2017 2:21 am
- Forum: ESP8266 boards
- Topic: how can I implement time scheduling in micropython
- Replies: 13
- Views: 11490
Re: how can I implement time scheduling in micropython
[quote=pythoncoder post_id=23678 time=1512460525 user_id=265] It's hard to figure out why your code doesn't run since the forum doesn't allow code posts until you've posted a few messages. So I can't see your indentation. But the following does work - tested on an ESP8266. Note I changed the on time...
- Mon Dec 04, 2017 11:08 pm
- Forum: ESP8266 boards
- Topic: how can I implement time scheduling in micropython
- Replies: 13
- Views: 11490
how can I implement time scheduling in micropython
How can i implement a similar to below time scheduling code in micropython?? from datetime import datetime turnon_time = "16:41:00" turnoff_time = "16:45:00" while True: current_time = datetime.strftime(datetime.now(),"%H:%M:%S") #output: 11:12:12 #print(current_time) if current_time == turnon_time:...