Search found 1362 matches

by deshipu
Thu Jun 18, 2020 1:58 pm
Forum: Hardware Projects
Topic: tips of easy to start tutorials/guides
Replies: 1
Views: 107

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: 1359

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: 1040

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: 1833

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...
by deshipu
Sun Mar 15, 2020 7:38 pm
Forum: General Discussion and Questions
Topic: How to use String and free memory with gc.collect()
Replies: 3
Views: 417

Re: How to use String and free memory with gc.collect()

The strings will be released when there is nothing else referring to them — so just setting one variable to None may not be enough, if you have already passed that string around and something is still using it. Also, there is no need to manually call gc.collect, it will get called automatically soon...
by deshipu
Sun Mar 15, 2020 7:33 pm
Forum: Hardware Projects
Topic: Smallest MCU for micropython
Replies: 15
Views: 1833

Re: Smallest MCU for micropython

Do you need it to be small in physical dimensions, or by any other criteria, like simplicity of the minimal working circuit, or unit price? The NRF51822 that is used to run MicroPython on Micro:bit is both small physically (a 32-pin QFN package, IIRC), small in terms of available flash and RAM, and ...
by deshipu
Sat Mar 14, 2020 10:07 pm
Forum: General Discussion and Questions
Topic: How to use String and free memory with gc.collect()
Replies: 3
Views: 417

Re: How to use String and free memory with gc.collect()

MicroPython interns all string constants, so once loaded, they never get released.
by deshipu
Sun Feb 23, 2020 9:21 am
Forum: Development of MicroPython
Topic: Slowing things down
Replies: 3
Views: 606

Re: Slowing things down

Why do you need it to be slower? What are you trying to do?
Usually you do this by using some delays or timers.
by deshipu
Sat Feb 01, 2020 1:13 pm
Forum: Development of MicroPython
Topic: Compiling _stage.mpy
Replies: 4
Views: 833

Re: Compiling _stage.mpy

For anyone struggling with a similar problem, here is a missing piece of documentation: https://github.com/tve/micropython/comm ... dd114d4fae
by deshipu
Thu Jan 16, 2020 4:48 pm
Forum: General Discussion and Questions
Topic: Combo of a C and python module?
Replies: 6
Views: 953

Re: Combo of a C and python module?

You can allegedly do that in the newest version, by generating a .mpy module following: http://docs.micropython.org/en/latest/develop/natmod.html — look at the example at https://github.com/micropython/micropython/tree/master/examples/natmod/features2 However, I haven't managed to get a non-trivial ...