Search found 10 matches

by deatz
Wed Nov 17, 2021 10:50 pm
Forum: Raspberry Pi microcontroller boards
Topic: Time if times
Replies: 22
Views: 18442

Re: Time if times

Bingo!! A few tweaks and we seem to be in business!

Thanks to all for your patience and help!

Now for a new project....

DeatZ
by deatz
Tue Nov 16, 2021 3:01 am
Forum: Raspberry Pi microcontroller boards
Topic: Time if times
Replies: 22
Views: 18442

Re: Time if times

I am using Thonny, though it's become a bit quirky with the last update. At any rate. just run this once and then after it is unplugged and replugged with another source it'll have it's own correct time? Everything works great as long as it stays plugged into a PC, but once I pull it and give it jus...
by deatz
Tue Nov 16, 2021 1:31 am
Forum: Raspberry Pi microcontroller boards
Topic: Time if times
Replies: 22
Views: 18442

Re: Time if times

I'll push this through tomorrow and see what I come up with.

This will set the time on the pico and when it is plugged back in, it will use the set time when utime.local() is called?

Thanks again for your patience and all your help!
DeatZ
by deatz
Sun Nov 14, 2021 9:55 pm
Forum: Raspberry Pi microcontroller boards
Topic: Time if times
Replies: 22
Views: 18442

Re: Time if times

I get [87, 104] I loaded up the ds3231_port.py code and it seems to run through, doesn't throw any errors but also doesn't remember the time when I unplug it and then plug it in to non-pc power. I can't seem to work my way through the code in ds3231_port.py to know what I should be getting. For inst...
by deatz
Sat Oct 30, 2021 3:36 pm
Forum: Raspberry Pi microcontroller boards
Topic: Time if times
Replies: 22
Views: 18442

Re: Time if times

Good day again, So I have made it to the point have everything working the way I want... so long as power is not interrupted after initialization. I was going to use battery power to run the Pico but with it continually looping, the batteries only last a few days (make me think I might should have p...
by deatz
Mon Oct 11, 2021 6:23 pm
Forum: Raspberry Pi microcontroller boards
Topic: Time if times
Replies: 22
Views: 18442

Re: Time if times

Shew.... at least I am not going crazy....

for now this will have to do :)

if 0 <= wd <= 3 or wd == 6
by deatz
Thu Oct 07, 2021 10:34 pm
Forum: Raspberry Pi microcontroller boards
Topic: Time if times
Replies: 22
Views: 18442

Re: Time if times

Finally got it, the Pico/uPython combination apparently is particular about how to parse/pull a snippet from the time function. now = localtime() now_hour = now[3] now_min = now[4] wd = now[6] Why oh Why can't there be just a little more continuity between Python-family libraries.. Or, I'm just such...
by deatz
Wed Oct 06, 2021 11:24 pm
Forum: Raspberry Pi microcontroller boards
Topic: Time if times
Replies: 22
Views: 18442

Re: Time if times

That does make sense, and I really only want it to run on the Pico, but I have yet to find an explanation of Utime that will allow the arguments I need. Essentially, I need to pull the current date and time, determine if it is a weekday and then at a certain time of day, between two times. When thos...
by deatz
Wed Oct 06, 2021 2:51 am
Forum: Raspberry Pi microcontroller boards
Topic: Time if times
Replies: 22
Views: 18442

Re: Time if times

Good day, thank you for the reply, I need to clarify I think. The code will work without the Pico connected and Thonny is using Python 3.9 as the interpreter (under "Run->Select Interpreter->The same interpreter which runs Thonny (default)) But when I connect the Pico and use it as the "interpreter"...
by deatz
Mon Oct 04, 2021 9:25 pm
Forum: Raspberry Pi microcontroller boards
Topic: Time if times
Replies: 22
Views: 18442

Time if times

Good day, I am new to MicroPython and Pico. I got my test script to run in Python only to realize that MicroPython deals with dates and time differently, so I worked in my uPython IDE (Thonny) to get it working with those time constraints, moved to the Pico as the interpreter and now it doesn't like...