Search found 275 matches

by davef
Thu Jun 17, 2021 12:49 am
Forum: ESP8266 boards
Topic: utime.localtime() giving 00:00 in hh:mm format
Replies: 2
Views: 35

Re: utime.localtime() giving 00:00 in hh:mm format

Just for setting the RTC import machine rtc = machine.RTC() datetime = rtc.datetime year = 2019 month = 12 day = 31 _weekday = 0 hours = 19 minutes = 05 seconds = 0 subseconds = 0 rtc.init((year, month, day, _weekday, hours, minutes, seconds, subseconds)) print(datetime_format.format(datetime()[0],g...
by davef
Thu Jun 17, 2021 12:08 am
Forum: ESP8266 boards
Topic: utime.localtime() giving 00:00 in hh:mm format
Replies: 2
Views: 35

Re: utime.localtime() giving 00:00 in hh:mm format

https://docs.micropython.org/en/latest/library/utime.html Maintaining actual calendar date/time: This requires a Real Time Clock (RTC). On systems with underlying OS (including some RTOS), an RTC may be implicit. Setting and maintaining actual calendar time is responsibility of OS/RTOS and is done ...
by davef
Wed Jun 16, 2021 8:37 pm
Forum: General Discussion and Questions
Topic: Saving data on ramdisk before a WDT event
Replies: 4
Views: 98

Re: Saving data on ramdisk before a WDT event

Hi Thomas,

Thanks for those suggestions.

As the data is not critical I am now saving what is on ramdisk to flash every hour. Worst-case is that I lose up to an hours worth of data. If something becomes "critical" I'll check out RTC memory.

Cheers,
Dave
by davef
Tue Jun 15, 2021 4:52 am
Forum: Raspberry Pi microcontroller boards
Topic: Timers hang when used around many sleeps
Replies: 3
Views: 81

Re: Timers hang when used around many sleeps

Try 20ms. One of the ESP devices has a min of 10ms, it might apply to other devices.
by davef
Mon Jun 14, 2021 8:51 pm
Forum: General Discussion and Questions
Topic: Saving data on ramdisk before a WDT event
Replies: 4
Views: 98

Re: Saving data on ramdisk before a WDT event

Point taken on RAM being scarce. My solution was to buy a ESP32 SPIRAM variant.

What I don't understand is how when the crash occurs (and RAM contents are lost) that I can still save an error message to flash.

I'll look into saving the data as you suggest.

Thanks
by davef
Sun Jun 13, 2021 10:55 pm
Forum: General Discussion and Questions
Topic: Saving data on ramdisk before a WDT event
Replies: 4
Views: 98

Saving data on ramdisk before a WDT event

I modified this snippet found elsewhere on the forum so that I could log the time of random timeouts (freezes) on a ESP32. Then I thought I would try to save what was in /ramdisk before I did a machine.reset() ## Simple software WDT implementation import machine import utime from shutil import copyf...
by davef
Thu Jun 10, 2021 9:16 pm
Forum: ESP32 boards
Topic: ESP32S2 WiFI connection problems
Replies: 7
Views: 181

Re: ESP32S2 WiFI connection problems

Thank you.
by davef
Thu Jun 10, 2021 7:58 pm
Forum: ESP32 boards
Topic: ESP32S2 WiFI connection problems
Replies: 7
Views: 181

Re: ESP32S2 WiFI connection problems

Roberthh,
That was reported earlier
I had a look for specific ESP32S2 issues and couldn't find one about RAM exhaustion.

Does this only affect the ESP32S2?

Thanks
by davef
Thu Jun 10, 2021 7:29 am
Forum: ESP32 boards
Topic: Send user message after webrepl connection
Replies: 3
Views: 125

Re: Send user message after webrepl connection

Code: Select all

webrepl.start()
utime.sleep(20)
print('hi there')
The problem I see is that you need the user to login first and before the 20 seconds are up! Maybe, there is a way that you can login with a stored or no password.
by davef
Tue Jun 08, 2021 8:16 am
Forum: General Discussion and Questions
Topic: Looking For Python Fast Track Course
Replies: 2
Views: 102

Re: Looking For Python Fast Track Course

Search <realpython>