Skip to content
#

microcontroller

Here are 1,324 public repositories matching this topic...

niaow
niaow commented Jul 6, 2020

In order for interrupt-based wake-ups (as introduced by #1142) to work concurrently with time.Sleep, we need to make some per-board changes.

Previously, sleepTicks (the function used as an interface between the scheduler and the hardware timer) was defined to block until the timer completed, since there was nothing else to do. Now we need to change this so that it bails out when an interrup

circuitpython
powersoft
powersoft commented Sep 1, 2020

I wont to convert a unixtimestamp to localtime in circuit python.
This is the simple code:

unix_correction = 946684800 # correct to 01-01-2000
timezone = 7200
t=1598887049

def convertUnixTime(t,timezone):
dummy=time.localtime(t-unix_correction+timezone)
return "%4d-%02d-%02d %02d:%02d" % (dummy[0],dummy[1],dummy[2],dummy[3],dummy[4])

Running it I get the error message:

"time

Improve this page

Add a description, image, and links to the microcontroller topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the microcontroller topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.