Search found 459 matches

by SpotlightKid
Sun May 30, 2021 8:26 pm
Forum: Raspberry Pi microcontroller boards
Topic: How to read Map() function in micropython?
Replies: 11
Views: 984

Re: How to read Map() function in micropython?

It's actually a built-in function (or rather a class acting like a function), which means you can use "map" for identifiers without getting a syntax error. You will then of course shadow the builtin function.
by SpotlightKid
Wed May 26, 2021 5:38 pm
Forum: ESP32 boards
Topic: What the best IDE for ESP32 micro python developing ?
Replies: 13
Views: 2296

Re: What the best IDE for ESP32 micro python developing ?

romeotango wrote:
Wed May 26, 2021 3:18 pm
Real Developers need real IDEs.
I hope this is irony.
by SpotlightKid
Sat May 22, 2021 5:33 pm
Forum: Raspberry Pi microcontroller boards
Topic: help required for a newbie
Replies: 1
Views: 440

Re: help required for a newbie

Are you sure the "coming" LED is initially off? It could be that is is wired to "active low", i.e. it lights up when the pin value is 0. To test this, just insert a "while True: pass" loop after your setup statements and see whether the LED is already lit up. Another possible reason is that 450 loop...
by SpotlightKid
Sat May 22, 2021 2:53 pm
Forum: General Discussion and Questions
Topic: datetime not working out of the box
Replies: 18
Views: 1718

Re: datetime not working out of the box

johanson wrote:
Sat May 22, 2021 2:40 pm
I could submit some improvements to urequests as well.
There are already about half a dozen of those with no response from the maintainers.

See also: viewtopic.php?f=15&t=10454
by SpotlightKid
Sat May 22, 2021 2:50 pm
Forum: General Discussion and Questions
Topic: datetime not working out of the box
Replies: 18
Views: 1718

Re: datetime not working out of the box

Who manages micropython-lib and why is there so little activity? In theory the micropython maintainers, in practice nobody. The micropython-lib was mainly created by an earlier MicroPython core developer (with many modules taken & adapted from the CPython stdlib), who has since left the project and...
by SpotlightKid
Sat May 22, 2021 2:38 pm
Forum: General Discussion and Questions
Topic: touchPad on Pin 2 (ESP32)
Replies: 3
Views: 1420

Re: touchPad on Pin 2 (ESP32)

The GH issue should be closed then.
by SpotlightKid
Sat May 22, 2021 2:26 pm
Forum: General Discussion and Questions
Topic: datetime not working out of the box
Replies: 18
Views: 1718

Re: datetime not working out of the box

I would not count on PRs to micropython-lib being merged anytime soon. Many have been languishing for years. There has been an effort to renovate and restructure micropython-lib about a year ago, but it seems to have fizzled out and nothing has happened. As to maintaining your own version, I don't s...
by SpotlightKid
Sat May 22, 2021 2:13 pm
Forum: ESP8266 boards
Topic: MicroPython library for HID (Keyboard) for ESP8266?
Replies: 2
Views: 479

Re: MicroPython library for HID (Keyboard) for ESP8266?

The ESP8266 does not have native USB capabilities, so AFAIK that's not possible, at least not in MicroPython. You can use an USB co-processor (programmed in C, e.g. an arduino micro with V-USB) or a microcontroller that has native USB support like an stm32fx or an rp2040 (pico). See also: https://fo...
by SpotlightKid
Sat May 22, 2021 1:39 pm
Forum: General Discussion and Questions
Topic: checking a value across lots of Constants
Replies: 3
Views: 567

Re: checking a value across lots of Constants

It depends a bit on what you want to do when you have matched a constant, but usually in Python you'd have a dictionary mapping constants as keys to functions as values: COMMANDS = { _CMD_WRITE: do_write, _CMD_READ: do_read, _CMD_DELETE: do_delete, } # etc. cmd = read_command() func = COMMANDS.get(c...
by SpotlightKid
Thu May 20, 2021 10:58 pm
Forum: General Discussion and Questions
Topic: Bitbanging DVI only possible on RP2040?
Replies: 1
Views: 728

Re: Bitbanging DVI only possible on RP2040?

Firstly, is this something that would be possible on any device (I'm particularly interested in the esp32) or does it appear to linked directly to the PIO features on the RP2040? No. Yes. Secondly, I am assuming that if it uses the PIO this code would have to be written outside of micropython, No, ...