Search found 1388 matches

by deshipu
Sun Sep 06, 2020 2:44 pm
Forum: Development of MicroPython
Topic: Native C module: accessing objects. [SOLVED]
Replies: 27
Views: 16768

Re: Native C module: accessing objects

You can do that, but you get a performance penalty, and I imagine that for a function like set_pixel that really matters. In this particular case there is another possible solution: since framebuf is itself a native module, you can simply link against it — this will create a copy of that function in...
by deshipu
Sat Sep 05, 2020 9:47 am
Forum: Development of MicroPython
Topic: Native C module: accessing objects. [SOLVED]
Replies: 27
Views: 16768

Re: Native C module: accessing objects

I'm afraid you can't do that. The only MicroPython C functions you can call from the inside of native modules are the ones that are explicitly listed in the mp_fun_table.
by deshipu
Wed Aug 19, 2020 7:45 pm
Forum: Development of MicroPython
Topic: Typesheds
Replies: 15
Views: 8933

Re: Typesheds

by deshipu
Tue Aug 11, 2020 1:46 pm
Forum: Development of MicroPython
Topic: machine constants
Replies: 5
Views: 3128

Re: machine constants

Sadly, nothing in MicroPython is device-independent.
by deshipu
Mon Jul 27, 2020 1:06 am
Forum: General Discussion and Questions
Topic: Best safe practices?
Replies: 3
Views: 2140

Re: Best safe practices?

mathieu wrote:
Sun Jul 26, 2020 5:37 pm
  • leave the voltage regulator on and connect the pyboard to a laptop using USB, but I have no idea how this might go wrong as the two sources of power do not share a common GND.
They do share a common GND. As soon as you connect them both to the pyboard, their grounds are connected.
by deshipu
Fri Jul 17, 2020 10:59 am
Forum: micro:bit boards
Topic: from machine import Pin
Replies: 3
Views: 4615

Re: from machine import Pin

Hi @joshuachu3. The MicroPython on Micro:bit is different than MicroPython on all other platforms, and the examples you find for other platforms will not work on it. In particular, there are no advanced functions such as pin interrupts. I hope that helps.
by deshipu
Thu Jun 18, 2020 1:58 pm
Forum: Hardware Projects
Topic: tips of easy to start tutorials/guides
Replies: 1
Views: 2597

Re: tips of easy to start tutorials/guides

You can try this old tutorial I made for a workshop once: https://micropython-on-esp8266-workshop.readthedocs.io/ — it includes a temperature sensor, so it should get you started.
by deshipu
Mon May 25, 2020 12:13 am
Forum: General Discussion and Questions
Topic: Avoiding "async def" creep
Replies: 21
Views: 14910

Re: Avoiding "async def" creep

I think there is one detail that you failed to mention here, I'm not sure if that's because you missed it, or if you simply consider it unimportant in this case. But I think that it is important, because it complicates the situation considerably and explains why your Seq would still need to be calle...
by deshipu
Wed May 20, 2020 11:07 am
Forum: ESP8266 boards
Topic: D1 Clones
Replies: 13
Views: 8302

Re: D1 Clones

You need to specify the flash mode when flashing your firmware — different boards will have the flash connected differently. There are four possible combinations, so you can just try them all and see which one works. If the flash chip is 16MB, the default micropython will not work — there are ways o...
by deshipu
Thu Mar 26, 2020 11:08 pm
Forum: Hardware Projects
Topic: Smallest MCU for micropython
Replies: 15
Views: 12961

Re: Smallest MCU for micropython

Same as you would flash any other firmware on that particular MCU—usually using a programmer device supporting the particular protocol that MCU uses. In case of NRF51 I think it's the SWIM protocol, so any programmer that handles that should work. If you don't care about price and stability, only ph...