Search found 5956 matches

by pythoncoder
Mon Aug 22, 2022 5:07 pm
Forum: Announcements and News
Topic: MicroPython version 1.19 released
Replies: 18
Views: 85633

Re: MicroPython version 1.19 released

@jimmo I am convinced there is something wrong with @vlasoveqn 's installation. He can't access uasyncio.gather which implies an ancient version of uasyncio , he's having problems with my @singleton decorator which is bog standard Python; the uos problem is also baffling. @vlasoveqn My approach woul...
by pythoncoder
Mon Aug 22, 2022 5:00 pm
Forum: Programs, Libraries and Tools
Topic: Managing asyncio tasks
Replies: 4
Views: 32330

Re: Managing asyncio tasks

Where hardware is inaccessible the best solution is often to run a watchdog timer. This needs careful design: you need to ensure that, if any task fails, the task feeding the WDT is cancelled. You might want to study the global exception handler.
by pythoncoder
Mon Aug 22, 2022 4:51 pm
Forum: Raspberry Pi microcontroller boards
Topic: Pico w mqtt_as to HiveMQ Cloud
Replies: 4
Views: 36086

Re: Pico w mqtt_as to HiveMQ Cloud

If you're using TLS (as implied by 8883) you need to set config['ssl'] = True . Please study the various tls examples. The suggestion of developing code with a local mosquitto broker is a good one. Getting TLS working can be tricky and it's good to know that your code is solid before you attempt it.
by pythoncoder
Sun Aug 21, 2022 8:35 am
Forum: Announcements and News
Topic: MicroPython version 1.19 released
Replies: 18
Views: 85633

Re: MicroPython version 1.19 released

No, uasyncio.gather is still there. Something seems to be wrong with your installation.
by pythoncoder
Sun Aug 21, 2022 8:28 am
Forum: General Discussion and Questions
Topic: Debugging and crash analysis techniques
Replies: 6
Views: 16161

Re: Debugging and crash analysis techniques

Official Raspberry Pi power supplies are designed for continuous use and have plenty of capacity.
by pythoncoder
Thu Aug 18, 2022 6:23 pm
Forum: Raspberry Pi microcontroller boards
Topic: How to load 32 bit constant from assembler with @micropython.asm_thumb
Replies: 6
Views: 19455

Re: How to load 32 bit constant from assembler with @micropython.asm_thumb

The DATA statement is almost unusable. I posted this PR seven years ago to provide a way to actually access the data but it was a bit of a hack and didn't find favour. The best solution is to put your constants in an array and pass that as an arg (arrays are contiguous). This repo has examples of pa...
by pythoncoder
Tue Aug 16, 2022 5:20 pm
Forum: Raspberry Pi microcontroller boards
Topic: Pico W Micro Python MQTT of data to a RP4B
Replies: 62
Views: 444621

Re: Pico W Micro Python MQTT of data to a RP4B

This f"{a},{b},{c}" is a Python "f-string". If a, b and c are floats it converts them to a string. Note the commas between the pairs of curly braces. This ensures that the string has a comma between each float. You could equally well separate them with any other text string. f"a = {a} b = {b} c = {c...
by pythoncoder
Tue Aug 16, 2022 5:06 pm
Forum: Raspberry Pi microcontroller boards
Topic: Pico W Micro Python autorun of code even after reboot
Replies: 7
Views: 27516

Re: Pico W Micro Python autorun of code even after reboot

boot.py runs before the board is fully configured. The filesystem is set up, but USB is not yet configured. The recommendation is to use main.py to launch your application.

Using boot.py to connect to WiFi should be OK but the official advice is to keep boot.py code minimal.
by pythoncoder
Tue Aug 16, 2022 8:50 am
Forum: General Discussion and Questions
Topic: 2D Arrays/Matrix in micropython
Replies: 5
Views: 15998

Re: 2D Arrays/Matrix in micropython

@jameswise That documentation link is incorrect.