Search found 326 matches

by kevinkk525
Sat May 12, 2018 7:28 am
Forum: Hardware Projects
Topic: In Search of a Hardware Project
Replies: 3
Views: 807

Re: In Search of a Hardware Project

If you are going to use an ESP32 I would recommend trying it with SPRAM on board. There is a possibility to use the WROOM module rev1 and add PSRAM: https://loboris.eu/forum/Thread-Info-Upgrade-ESP32-board-without-psRAM-with-4MB-8MB-SPIRAM That would be interesting as there are practically no boards...
by kevinkk525
Thu May 10, 2018 8:29 am
Forum: ESP8266 boards
Topic: [workaround used] esp8266 gets stuck periodically
Replies: 32
Views: 2800

Re: Asyncio gets stuck periodically

Is 0x1000 seconds something special in the firmware? I can't get a correct downtime as i'm using the mqtt last wish publication and my mqtt client has a timeout of 60 seconds. According to that the microcontroller was offline for 1h 10min 31sec but of course there is a reconnection of the WLAN in th...
by kevinkk525
Thu May 10, 2018 7:48 am
Forum: ESP8266 boards
Topic: [workaround used] esp8266 gets stuck periodically
Replies: 32
Views: 2800

Re: Asyncio gets stuck periodically

All my decorations of running code did not give any result. 2 microcontroller went offline after ~1 week for 1h 10 minutes but none of my decorated functions were the reason. I will now change uasyncio core to measure the time a coroutine is executed. I probably won't be able to get the name or line...
by kevinkk525
Wed May 09, 2018 7:38 am
Forum: ESP8266 boards
Topic: frezze modules and building micropython...
Replies: 3
Views: 356

Re: frezze modules and building micropython...

without more details and what error occurs, nobody will be able to help you..

btw: I don't use vagrant and it works fine
by kevinkk525
Wed May 09, 2018 7:37 am
Forum: General Discussion and Questions
Topic: uasyncio: best way to write to a file from a coroutine
Replies: 9
Views: 680

Re: uasyncio: best way to write to a file from a coroutine

Try this: async def file_write(name): for i in range(50): with open(name,"a") as f: f.write('async_'+str(i)+'_') await asyncio.sleep(1) It opens the file only for writing and closes it afterwards. That way no file is kept open. open(name,"a") opens the file for appending and does not replacing the p...
by kevinkk525
Thu May 03, 2018 7:15 am
Forum: ESP8266 boards
Topic: Inherit Pin class not working
Replies: 3
Views: 329

Re: Inherit Pin class not working

Oh.. did not read that. Thanks.
Interesting that it works on the loboris fork on esp32 though.
by kevinkk525
Tue May 01, 2018 9:07 pm
Forum: ESP8266 boards
Topic: Inherit Pin class not working
Replies: 3
Views: 329

Inherit Pin class not working

I tried to inherit the Pin class to include a dictionary from nodemcu pin names to pin id but I got the following problems: >>> class PinNew(machine.Pin): ... def __init__(self, *args,**kwargs): ... args=list(args) ... if type(args[0])==str: ... args[0]=pins[args[0]] ... print(args,kwargs) ... super...
by kevinkk525
Thu Apr 26, 2018 7:28 am
Forum: ESP8266 boards
Topic: [workaround used] esp8266 gets stuck periodically
Replies: 32
Views: 2800

Re: Asyncio gets stuck periodically

Thanks for your input. I decorated all coroutines and some functions to send a log message if they take longer than a predefined time (made the while loops a different coroutine), even your mqtt library. This way I'll hopefully find the coroutine responsible for the freeze. This should also uncover ...
by kevinkk525
Wed Apr 25, 2018 11:48 am
Forum: ESP8266 boards
Topic: [workaround used] esp8266 gets stuck periodically
Replies: 32
Views: 2800

Re: Asyncio gets stuck periodically

It's not the communication that stops during the time of 1h 10 minutes, it's the scheduler (or something blocking the scheduler). I run this coroutine: async def _stability_log(interval): st = time.ticks_ms() while True: await asyncio.sleep(interval) st_new = time.ticks_ms() diff = time.ticks_diff(s...
by kevinkk525
Wed Apr 25, 2018 9:20 am
Forum: ESP8266 boards
Topic: [workaround used] esp8266 gets stuck periodically
Replies: 32
Views: 2800

Re: Asyncio gets stuck periodically

Thanks for your answer. I am sure it's not your mqtt library, because you put a lot of effort to test it. My WIFI is quite stable and the problem does not occur on multiple µC at the same time. It's always one µC. It's good to know that you never encountered this kind of blocking. I will try to prod...