Search found 3607 matches

by pythoncoder
Fri Oct 18, 2019 7:50 am
Forum: General Discussion and Questions
Topic: Modules with the leading "u" and without.
Replies: 7
Views: 155

Re: Modules with the leading "u" and without.

kevinkk525 wrote:
Fri Oct 18, 2019 7:23 am
...to add to the confusion I never know if a port supports the weak-link to "os" or doesn't...
Yes: we should be consistent.
by pythoncoder
Fri Oct 18, 2019 7:48 am
Forum: Programs, Libraries and Tools
Topic: Show all opened sockets
Replies: 5
Views: 90

Re: Show all opened sockets

It is odd that ESP8266 nodes experience far more WiFi outages than Pyboard D's. Compare several a day to two in over two weeks (in the same location). I started out on this journey because I couldn't keep official UMQTT running for more than an hour on an ESP8266. The other factor (for @sebion's ben...
by pythoncoder
Fri Oct 18, 2019 7:21 am
Forum: Programs, Libraries and Tools
Topic: Show all opened sockets
Replies: 5
Views: 90

Re: Show all opened sockets

The ESP8266 is less stable than other platforms. I am currently running a long term test of resilient MQTT running on two Pyboard D clients. One has run for 2 weeks 3 days and coped with two WiFi outages. The other (in an adverse -80dB RSSI location) has run for four days with one outage and 9 retra...
by pythoncoder
Fri Oct 18, 2019 7:02 am
Forum: General Discussion and Questions
Topic: Modules with the leading "u" and without.
Replies: 7
Views: 155

Re: Modules with the leading "u" and without.

I don't have strong views either way but one merit of the 'u' names is to emphasise restricted functionality. If the docs advocate (e.g.) import os, will we get howls of anguish from people familiar with the full-fat version discovering that their favourite functions are unsupported?
by pythoncoder
Thu Oct 17, 2019 5:48 pm
Forum: Other Boards
Topic: STM Where are the frozen modules place
Replies: 9
Views: 130

The answer!

Thank you Robert. That's saved me a lot of time. :D It would be good if @jimmo or @Damien explained the merits of the manifest. If you and I are puzzled, my guess is that we're not alone. It's a shame when hard work goes into developing new features which remain unused, either because users don't kn...
by pythoncoder
Thu Oct 17, 2019 5:27 pm
Forum: Programs, Libraries and Tools
Topic: Show all opened sockets
Replies: 5
Views: 90

Re: Show all opened sockets

I'd put each socket into a Python set , and remove it before you close it. Periodically print the contents of the set. It's also handy periodically to print the amount of free RAM: a good way to detect memory leaks caused by objects persisting after the need for them has passed. A word of warning: d...
by pythoncoder
Thu Oct 17, 2019 1:07 pm
Forum: Programs, Libraries and Tools
Topic: nested coros with uasync
Replies: 3
Views: 71

Re: nested coros with uasync

If the coro is written such that it will run forever, awaiting it will pause forever. You need to instantiate it as a separate coro: import uasyncio as asyncio def starchaser(): while True: print("star!") yield asyncio.sleep_ms(200) async def supervisor(loop): loop.create_task(starchaser()) # subseq...
by pythoncoder
Thu Oct 17, 2019 7:17 am
Forum: Other Boards
Topic: STM Where are the frozen modules place
Replies: 9
Views: 130

manifest.py: how to use it?

Are you sure it's creating firmware.dfu and firmware.elf ? Because it isn't here. The latest build has changed the way that frozen files are specified. It now uses a 'manifest.py' file in stm32/boards. I haven't yet figured out the implications of this but it's broken my build script. Perhaps @jimmo...
by pythoncoder
Tue Oct 15, 2019 6:45 am
Forum: MicroPython pyboard
Topic: What is lowest consumption of D-series?
Replies: 5
Views: 167

Re: What is lowest consumption of D-series?

Low power usage is promised for the Pyboard D. The developers are currently working on other promised features such as BLE. @Damien has written a demo of a webserver running at very low power levels so the hardware has this capability. I'm sure the issue with pyb.stop will be fixed in a future firmw...
by pythoncoder
Mon Oct 14, 2019 7:39 am
Forum: MicroPython pyboard
Topic: What is lowest consumption of D-series?
Replies: 5
Views: 167

Re: What is lowest consumption of D-series?

Sub 50μA is definitely possible on Pyboard 1.x. I believe the Pyboard D is capable of this but haven't tested it. You'll need to disable USB and WiFi and possibly the 3.3V output regulator. For the very lowest power consumption it's best to put unused pins into output mode (floating inputs can draw ...