Search found 1365 matches

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

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

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

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

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

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

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

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

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

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

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

MicroPython interns all string constants, so once loaded, they never get released.