Search found 425 matches

by SpotlightKid
Wed Feb 03, 2021 11:13 am
Forum: General Discussion and Questions
Topic: url decode
Replies: 4
Views: 9541

Re: url decode

def UrlPercent(aData: bytearray) -> str: ... That will also work and is a bit more terse, but behaves differently: a) doesn't take str b) returns str not bytes c) does not handle invalid escape sequences c) additionally does '+' replacement. It is also slower, even if the '+' replacement (which sho...
by SpotlightKid
Fri Jan 22, 2021 7:47 pm
Forum: Other Boards
Topic: WeAct STM32F411CEU6 black pill
Replies: 75
Views: 21650

Re: WeAct STM32F411CEU6 black pill

This is apparently an update of this variant of the Black Pill: https://stm32-base.org/boards/STM32F401CCU6-WeAct-Black-Pill-V1.2 You need to compile your own firmware for this variant of the Black Pill. You should be able to use this board definition from WeACT: https://github.com/YXZhu/micropython...
by SpotlightKid
Mon Jan 18, 2021 11:41 pm
Forum: General Discussion and Questions
Topic: [SOLVED] urequests + redirects
Replies: 18
Views: 3884

Re: [SOLVED] urequests + redirects

Yeah, and neither would fit on an MicroPython board without serious reworking ("urequest.py" has not much in common with "requests" except the name and the module-level function names). At which point it is easier to (re-)implement the features you need from them. Feel free to prove me wrong by port...
by SpotlightKid
Mon Jan 18, 2021 11:22 pm
Forum: General Discussion and Questions
Topic: [SOLVED] urequests + redirects
Replies: 18
Views: 3884

Re: [SOLVED] urequests + redirects

mattyt wrote:
Wed Dec 02, 2020 1:17 am
Don't suppose anyone is keen to port - or write a subset - of httpx to MicroPython?
This would be unlikely to succeed. httpx has a current LOC of 7553 (LLOC: 3244) and depends on half a dozen other Python modules.
by SpotlightKid
Mon Jan 18, 2021 10:59 pm
Forum: General Discussion and Questions
Topic: [SOLVED] urequests + redirects
Replies: 18
Views: 3884

Re: [SOLVED] urequests + redirects

It’s moved here: https://github.com/pfalcon/micropython-lib/tree/master/urequests Can you show me how to use this library in MicroPython? I get error showing me the ussl module doesn't have the SSLContext method.Thanks. Here, I fixed it for ya: https://gist.github.com/SpotlightKid/8637c685626b334e5...
by SpotlightKid
Thu Sep 24, 2020 7:53 pm
Forum: General Discussion and Questions
Topic: Show me: a library for easy WiFi setup for non-dev end-users
Replies: 4
Views: 1790

Re: Show me: a library for easy WiFi setup for non-dev end-users

I tested this just now on my ESP32 and it worked nicely. So thanks for your work and sharing it! My phone didn't pop up the "Sign-in to .." message, but my tablet did. It may be that the Android version on my phone is too old. I could still access the login page by opening it manually in the browser...
by SpotlightKid
Tue Aug 18, 2020 8:32 pm
Forum: WiPy and CC3200 boards
Topic: Sending email
Replies: 36
Views: 30035

Re: Sending email

The RFC prescribes that all lines in a message must end with CR + LF (i.e. '\r\n') not only a single line-feed. Most mail clients and server tolerate line-feed-only line endings, though, but...
by SpotlightKid
Tue Aug 18, 2020 5:40 pm
Forum: Programs, Libraries and Tools
Topic: uMail - A lightweight SMTP client for MicroPython
Replies: 34
Views: 12572

Re: uMail - A lightweight SMTP client for MicroPython

@davef: uMail does not format the email for you. It is equivalent to the "smtplib" module in the CPython standard library. If you want a subject or any other header, you need to format an RFC5322-compliant message string. On CPython your would do this with the "email" module, but that is much too bi...
by SpotlightKid
Thu Jul 16, 2020 1:46 pm
Forum: Drivers for External Components
Topic: VS1053b audio drivers: play music, speech or sound FX
Replies: 15
Views: 3249

Re: VS1053b audio drivers: play music, speech or sound FX

You would need to mix the different samples when they are played into a continuous (stereo) audio stream and send that to the audio card. So you'd need <time polyphony> waveform oscillators and at least <times polyphony> amplitude envelope generators (plus optionally as many filters, LFOs etc.). Bas...
by SpotlightKid
Sat Jun 27, 2020 6:06 am
Forum: Other Boards
Topic: WeAct STM32F411CEU6 black pill
Replies: 75
Views: 21650

Re: WeAct STM32F411CEU6 black pill

Yes, I read that. I was looking though to make the most of the existing flash or extending it without having to order extra parts.