Search found 7 matches

by hwiguna
Thu Apr 22, 2021 2:40 am
Forum: Raspberry Pi microcontroller boards
Topic: Having trouble with ure.match()
Replies: 2
Views: 2191

Having trouble with ure.match()

Maybe I wrote the regex wrong, but according to regex101.com regex below should return four matches. ure.match("[abcd][01][01]","d00ba11c01d10") When I use ure on "MicroPython v1.14 on 2021-04-11; Raspberry Pi Pico with RP2040" that expression only returns one match (the first one). How do I get to ...
by hwiguna
Mon Apr 12, 2021 12:40 am
Forum: Raspberry Pi microcontroller boards
Topic: Windows fail to recognize Pi Pico when running this code
Replies: 7
Views: 7528

Re: Windows fail to recognize Pi Pico when running this code

Latest MicroPython release "rp2-pico-20210411-unstable-v1.14-152-g6f06dcaee.uf2 (latest)" still has trouble finding the Pi Pico with that main.py. :-(
by hwiguna
Sun Apr 11, 2021 6:52 pm
Forum: Raspberry Pi microcontroller boards
Topic: Windows fail to recognize Pi Pico when running this code
Replies: 7
Views: 7528

Re: Windows fail to recognize Pi Pico when running this code

Sorry, I should have thought of including that.
I'm running the latest stable release: "Micropython v1.14 on 2021-02-02; Raspberry Pi Pico with RP2400."

I have not tried the newer unstable versions. I presume replacing the uf2 would clobber all my py code, right?
by hwiguna
Sun Apr 11, 2021 5:00 pm
Forum: Raspberry Pi microcontroller boards
Topic: Windows fail to recognize Pi Pico when running this code
Replies: 7
Views: 7528

Windows fail to recognize Pi Pico when running this code

def main(): from machine import Pin, I2C from ssd1306 import SSD1306_I2C from utime import sleep i2c=I2C(1,sda=Pin(2), scl=Pin(3), freq=400000) oled = SSD1306_I2C(128, 64, i2c) points = [\ (9,11),(10,11),(11,11), (12,12),\ (13,13),(13,14),(13,15),\ (14,16),\ (15,17),(16,17),(17,17),\ (18,16),\ (19,...
by hwiguna
Sat Mar 27, 2021 12:51 pm
Forum: Raspberry Pi microcontroller boards
Topic: Is Micropython inherently multithreaded?
Replies: 7
Views: 3154

Re: Is Micropython inherently multithreaded?

Optimisation is an involved process. A first step is to read this doc and this one to learn about MicroPython specific optimisations. There are a lot of ways to improve performance. Peter, I've just scanned those two resources. They're excellent! I will digest them in detail, apply, and time their ...
by hwiguna
Fri Mar 26, 2021 12:34 pm
Forum: Raspberry Pi microcontroller boards
Topic: Is Micropython inherently multithreaded?
Replies: 7
Views: 3154

Re: Is Micropython inherently multithreaded?

Thank you for the replies everyone! If you're interested, here is the dual core version: https://github.com/hwiguna/HariFun_202_MandelbrotPico/blob/main/PicoMandelbrotDualCore.py It works, but it is only marginally faster than the single core version: https://github.com/hwiguna/HariFun_202_Mandelbro...
by hwiguna
Fri Mar 26, 2021 3:42 am
Forum: Raspberry Pi microcontroller boards
Topic: Is Micropython inherently multithreaded?
Replies: 7
Views: 3154

Is Micropython inherently multithreaded?

After much hair pulling, I was able to get my Mandelbrot calculation run on two threads (core0 as usual, plus core1 via _thread.start_new_thread(). However, it does not run to be twice as fast or anywhere near that. Is MicroPython inherently already multithreaded and I'm just inefficiently trying to...