Search found 463 matches

by SpotlightKid
Wed May 19, 2021 10:23 pm
Forum: Other Boards
Topic: [w600] socket.connect() hangs
Replies: 4
Views: 3455

Re: [w600] socket.connect() hangs

Not sure whether one of the methods described in the docs is supported by your port / socket implementation:

http://docs.micropython.org/en/latest/l ... settimeout
by SpotlightKid
Wed May 19, 2021 7:40 pm
Forum: ESP32 boards
Topic: urequests - any way to download files by chunks
Replies: 7
Views: 7948

Re: urequests - any way to download files by chunks

The sad truth is, that urequests from micropython-lib (which is also included in some older official firmware builds) is unmaintained, outdated, incomplete and buggy. I've written an evolved and improved version called mrequests , which can do what you ask: >>> import mrequests >>> r = mrequests.get...
by SpotlightKid
Tue May 18, 2021 11:20 am
Forum: General Discussion and Questions
Topic: Send midi Control (cc) message
Replies: 2
Views: 2301

Re: Send midi Control (cc) message

I know this thread is already a few months old, but for posterity: To convert the MIDI message data from integers to bytes for sending them with uart.write() , just use the builtin bytes function. Example: # send CC #64 (Sustain) on channel 3 with value 64 (=on) channel = 2 # (zero-based channel cou...
by SpotlightKid
Tue May 18, 2021 10:44 am
Forum: Announcements and News
Topic: Google Season of Docs 2021: Welcome Niti
Replies: 2
Views: 33960

Re: Google Season of Docs 2021: Welcome Niti

That's great news. Looking forward to hearing about the progress.
by SpotlightKid
Tue May 18, 2021 10:29 am
Forum: General Discussion and Questions
Topic: Why does split method behave differently in an inline if-else statement?
Replies: 4
Views: 2085

Re: Why does split method behave differently in an inline if-else statement?

You are missing some parentheses (and have others, which are not necessary). Correct: a, b = u.split('^') if '^' in u else (u,'') Your original code gets parsed like this: a, b = (<ternary-expression>, '') And then tuple unpacking and assignment assigns the result of the ternary expression (the firs...
by SpotlightKid
Tue May 18, 2021 10:18 am
Forum: MicroPython pyboard
Topic: Lack of stm32f405 chipset.
Replies: 1
Views: 3067

Re: Lack of stm32f405 chipset.

If you look at the ports/stm32/boards directory of the MicroPython sources, you can see which boards with STM32 chips are supported: https://github.com/micropython/micropython/tree/master/ports/stm32/boards There are many boards with different F4 chips as well as others from the L/H product lines. T...
by SpotlightKid
Sun May 16, 2021 9:06 pm
Forum: ESP32 boards
Topic: 'urequests' isn't defined
Replies: 1
Views: 1452

Re: 'urequests' isn't defined

Yes: https://github.com/micropython/micropython/commit/ce1de1faf082abfcc5469ad3d70b88aaa0060ec3#diff-b599a30851520edc2eeee06fb4234d5412241ec7661958d7e6f626886a1e8f71 IMHO the module is of limited use anyway, since it doesn't support HTTP basic auth or redirections and has other problems too. I wrote...
by SpotlightKid
Sat May 15, 2021 1:07 pm
Forum: Raspberry Pi microcontroller boards
Topic: String To Float
Replies: 3
Views: 2937

Re: String To Float

Then str(LED[-2]) doesn't return what you think it does. Insert a print call to check its value and whether the substring from char 6 (zero-based) is a valid float representation - and nothing else or anything else after it.
by SpotlightKid
Tue May 11, 2021 11:40 am
Forum: General Discussion and Questions
Topic: Sad farewell to pyboard and micropython, another push is needed to finish things off...
Replies: 10
Views: 8294

Re: Sad farewell to pyboard and micropython, another push is needed to finish things off...

Please stop bashing micropython for the decisions YOU made. This is not constructive. This is not constructive either. MicroPython has many flaws and not discussing them doesn't help anybody. Nor does admonishing people who make the effort of explaining their reasons for not liking of abandoning Mi...