how can I implement time scheduling in micropython

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
zedtech
Posts: 22
Joined: Thu Nov 30, 2017 3:36 am

Re: how can I implement time scheduling in micropython

Post by zedtech » Sat Dec 09, 2017 2:23 am

@pythoncoder,
Thanks again for those pointers and i have taken them into account and made changes, that's I converted all the the times I'm working with into seconds, saved as integers.
I now get it, your point is about precision comparison.

As per code in my last reply, would you know as to why the current_time isn't updating in the while loop? Let's say that the time comparison failed, is that affecting the rest of the code in the while loop?

User avatar
pythoncoder
Posts: 3362
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: how can I implement time scheduling in micropython

Post by pythoncoder » Sat Dec 09, 2017 7:16 am

I can see no reason for it to fail to update. If you can't get to the bottom of it I suggest you post your latest attempt.
Peter Hinch

JumpZero
Posts: 27
Joined: Mon Oct 30, 2017 5:54 am
Location: Arcachon - France

Re: how can I implement time scheduling in micropython

Post by JumpZero » Fri Dec 15, 2017 12:42 pm

@zedtech have you ever tried this https://github.com/rguillon/schedule
I found it very smart, however on ESP8266 I had to implement it as frozen module (memory error otherwise)

zedtech
Posts: 22
Joined: Thu Nov 30, 2017 3:36 am

Re: how can I implement time scheduling in micropython

Post by zedtech » Tue Jan 02, 2018 3:16 am

@JumpZero, no i haven't but will take a look and learn something new. Thanks for your feedback

Post Reply